Category python-top-tutorials

Python comments

Python Comments Python comments are programmer-readable explanations or comments added to Python source code. Their purpose is to make the source code easier for humans to understand and are ignored by the Python interpreter. Comments improve code readability and help…

Python if-else statement

Python if-else Statement In addition to using the if statement, you can optionally use the else keyword. This provides an alternative block of statements to execute if the Boolean expression (in the if statement) is not true. This flowchart illustrates…

Sending Emails with Python

Sending Mail with Python Applications that handle and deliver Internet email are called “mail servers.” The Simple Mail Transfer Protocol (SMTP) is a protocol that handles email sending and routing between mail servers. It is the Internet standard for email…

Python Reflection

Python Reflection In object-oriented programming, reflection refers to the ability to extract information about any object you’re working with. You can find out what type an object is, whether it’s a subclass of any other class, its attributes, and so…

Python arrays

Python Arrays Python’s standard data types, list, tuple, and string, are all sequence data. Sequence objects are ordered collections, with each element identified by an index starting at zero and increasing in value. Furthermore, the elements in a sequence do…

Python try-except block

Python try-except block You can also use the except statement without defining any exceptions, as shown below − try: You do your operations here …………………. except: If there is any exception, then execute this block. …………………. else: If there is…