<< < 1 2 3 4 5 6 > >>   Sort: Date

What Is Variable
What is variable in Python? A variable is symbolic name that can be assigned with a reference link to a data object resulted from an expression. In Python, variables are not declared specifically for any data type. They can be used without declaration statements. For example, the following assignmen...
2018-03-13, 1337🔥, 0💬

'continue' Statement in Repeating Statement Blocks
How to use the "continue" statement in a repeating statement block in Python code? The "continue" statement can be used in a repeating statement block like "for" and "while" loops to continue with the next looping item immediately. When a "continue" statement is interpreted, Python will skip the res...
2017-09-12, 1335🔥, 0💬

Multi-line Statements in Python Code
How to enter a single statement in multiple lines in Python Code? By default, Python uses the end of line to end a statement. So normally, you enter a statement in a single line. But if you have a very long statement, you can enter a single statement in multiple lines in two ways: 1. Explicit line b...
2023-06-12, 1331🔥, 0💬

Calling Function with Keyword Parameters
How to call a function with keyword parameters instead of positional parameters? By default, you should call a function with a list of data objects as positional parameters matching the parameter list in the function "def" statement. But you can also call a function with name value pairs as keyword ...
2022-10-26, 1327🔥, 0💬

'bytes' Values are Objects
Are "bytes" values objects in Python? Yes, "bytes" values are objects in Python. In fact, all data values in Python are objects. In Python, "bytes" is defined as an object class with the following interesting properties, constructors, and methods: bytes.__doc__ - Property holding a short description...
2022-12-03, 1325🔥, 0💬

Using Python Built-in Data Types
Where to find tutorials on Python Built-in Data Types? Here is a list of tutorials to answer many frequently asked questions compiled by FYIcenter.com team on Python Built-in Data Types: Python Built-in Primitive Data Types 'int' Literals and Conversions 'float' Literals and Conversions Python Built...
2023-01-06, 1322🔥, 0💬

'if ... elif ... else' Conditional Statement Blocks
How to enter "if ... elif ... else" statement blocks in Python code? "if ... elif ... else" statement blocks allow you to execute statement blocks conditionally. When "if ... elif ... else" statement blocks are interpreted, only the first statement block that is associated to a condition returning T...
2023-06-12, 1321🔥, 0💬

'str' Literals and Conversions
How to specify "str" values in Python code? "str" values can be specified using "str" literals or the str() conversion function as shown in this tutorial: 1. "str" literals in double quotes as shown below: &gt;&gt;&gt; "FYIcenter.com" 'FYIcenter.com' &gt;&gt;&gt; "He says: \"...
2018-04-07, 1321🔥, 0💬

Function Parameters Assigned with Object References
Is it true that all function parameters are assigned with object references in Python? Yes, all function parameters are assigned with object references in Python. You modify referenced data objects to share data with the calling statement. Here is a good example of modifying the data object referenc...
2018-02-08, 1320🔥, 0💬

Access Class Properties through Instance Name
Can I access class properties through an instance name? Yes, you can access class properties through an instance name, as long as there is no instance property that has the same name as a class property. When you reference a property through the instance name in the following form: instance_name.pro...
2022-09-24, 1316🔥, 0💬

'urllib' Module - Internet Communication
Where to find tutorials on Python "urllib" Module? Here is a list of tutorials to answer many frequently asked questions compiled by FYIcenter.com team on Python "urllib" Module. What Is Python Module 'urllib' Sending an HTTP Request with 'urllib.request' http.client.HTTPResponse Objects HTTP POST w...
2018-09-24, 1313🔥, 0💬

'list' Literals and Conversions
How to specify "list" values in Python code? "list" values can be specified using "list" literals or the list() conversion function as shown in this tutorial: 1. "list" literals in [v1, v2, ...] format as shown below: &gt;&gt;&gt; ["Age", 25] ['Age', 25] &gt;&gt;&gt; ["Age", ...
2018-04-07, 1312🔥, 0💬

Functions Are Objects Too
Are functions objects in Python? Yes, all functions are objects of "function" type in Python? You can verify this with the following Python code: &gt;&gt;&gt; def x(): ... print("Hello world!") ... &gt;&gt;&gt; type(x) &lt;class 'function'&gt; In other words, the "def...
2018-02-08, 1305🔥, 0💬

'float' Literals and Conversions
How to specify "float" values in Python code? "float" values can be specified using "float" literals or the float() conversion function as shown in this tutorial: 1. "float" literals in scientific notations as shown below: &gt;&gt;&gt; 3.14159 3.14159 &gt;&gt;&gt; -2.14 -2.14...
2018-04-07, 1301🔥, 0💬

Python Built-in Structured Data Types
Python Built-in Structured Data Types? Python Built-in Structured Data Types are data types provided by the Python interpreter to represent structures of data values: Here is a list of commonly used Python Built-in Structured Data Types: "str" - String data type for sequences of Unicode characters, ...
2018-04-07, 1285🔥, 0💬

Where Are Class Properties Stored
Where Are Class Properties Stored? Class properties are stored in a built-in property called "__dict__" in class "type" object. The "__dict__" property is inherited from the base class "object" and managed by the Python engine. If you ever forget what class properties are associated with a class, yo...
2018-01-27, 1283🔥, 0💬

'dict' Values are Objects
Are "dict" values objects in Python? Yes, "dict" values are objects in Python. In fact, all data values in Python are objects. In Python, "dict" is defined as an object class with the following interesting properties, constructors, and methods: dict.__doc__ - Property holding a short description of ...
2023-07-01, 1279🔥, 0💬

Function Parameter Default Expression Executed Only Once
Is it true that the function parameter default expression is only executed once in Python? Yes, the function parameter default expression is only executed once in Python when the "def" statement is interpreted. For example, in the following Python code, when the "def profile()" statement is interpre...
2022-10-26, 1279🔥, 0💬

'list' Values are Objects
Are "list" values objects in Python? Yes, "list" values are objects in Python. In fact, all data values in Python are objects. In Python, "list" is defined as an object class with the following interesting properties, constructors, and methods: list.__doc__ - Property holding a short description of ...
2022-12-03, 1271🔥, 0💬

'return' Statement in Function Statement Block
How to use the "return" statement in a function statement block in Python? The "return" statement can be used in a function statement block to terminate the execution of the function and return a data object to the calling expression. Here is a good example of "return" statement used in a function s...
2018-02-28, 1264🔥, 0💬

'return' Statement in Function Statement Block
How to use the "return" statement in a function statement block in Python? The "return" statement can be used in a function statement block to terminate the execution of the function and return a data object to the calling expression. Here is a good example of "return" statement used in a function s...
2018-02-28, 1264🔥, 0💬

'__dict__' Dictionary in Function Object
What is the "__dict__" dictionary property in a function object? By default every function object has "__dict__" built-in dictionary property. Each name value pair in this dictionary becomes a formal property of the function object accessible using the "." operation. It is empty when the function ob...
2018-02-08, 1256🔥, 0💬

Comments in Python Code
How to enter comments in Python Code? There is only one way to enter comments in Python code. That is to enter them at the end of any code line preceded by the hash character "#". For example: # this is the first comment x = 1 # and this is the second comment # and now a third!   ⇒ 'if ... elif ... ...
2023-06-12, 1255🔥, 0💬

'int' Literals and Conversions
How to specify "int" values in Python code? "int" values can be specified using "int" literals or the int() conversion function as shown in this tutorial: 1. "int" literals in decimal digits as shown below: &gt;&gt;&gt; 1234 1234 &gt;&gt;&gt; -1234 -1234 &gt;&gt;&...
2023-01-06, 1254🔥, 0💬

<< < 1 2 3 4 5 6 > >>   Sort: Date