Python اسئلة واجوبة المقابلات
فروقات ذات صلة
سؤال 6. Define modules in Python?
The module is defined as a file that includes a set of various functions and Python statements that we want to add to our application.
سؤال 7. What is the difference between .py and .pyc files?
py files are Python source files. .pyc files are the compiled bytecode files that are generated by the Python compiler.
سؤال 8. Define String in Python?
String in Python is formed using a sequence of characters. Value once assigned to a string cannot be modified because they are immutable objects. String literals in Python can be declared using double quotes or single quotes.
Ex:
- print("Hello")
- print('Hello')
سؤال 9. What do you understand by the term namespace in Python?
A namespace in Python can be defined as a system that is designed to provide a unique name for every object in python. Types of namespaces that are present in Python are:
- Local namespace
- Global namespace
- Built-in namespace
Scope of an object in Python:
Scope refers to the availability and accessibility of an object in the coding region.
سؤال 10. Define iterators in Python?
In Python, an iterator can be defined as an object that can be iterated or traversed upon. In another way, it is mainly used to iterate a group of containers, elements, the same as a list.
الاكثر فائدة حسب تقييم المستخدمين:
- What is Python?
- How do I share global variables across modules?
- How do you set a global variable in a function in Python?
- What type of language is Python? Programming or Scripting?
- Why can't I use an assignment in an expression?