Python Interview Questions
1 .
What is Python ?
Python is an object-oriented, high level language, interpreted, dynamic and multipurpose programming language. Developed by Guido van Rossum in the early 1990. Python runs on many Unix variants, on the Mac, and on Windows 2000 and later.
2 .
What is Python Variables ?
Python variables are the most powerful features of a programming language is the ability to manipulate variables. A variable is a name that refers to a value. An  assignment statement creates new variables and gives them values.

Ex :
>>> name = 'Free Time Learning'
>>> x = 120
>>> value = 91.125784037
3 .
What is Python Keywords ?
Python keywords are special reserved words which convey a special meaning to the compiler/interpreter. In Python keywords are case sensitive each keyword have a special meaning and a specific operation. 

Python Keywords :

True, break, finally, is, return, False, continue, for, lambda, try, None, except, in, raise, pass, class, def, from, nonlocal, while, and, del, global, not, with, as,  elif, if, or, assert, else, import, yield.
4 .
What is Python Comments ?
In Python, we use the hash (#) symbol to start writing a comment. 

Single lined comment :
In case user wants to specify a single line comment, then comment must start with ?#?

Multi lined Comments :
If we have comments that extend multiple lines, one way of doing it is to use hash (#) in the beginning of each line. For example.

#This is
#educational website.
#URL is freetimelearning.com
5 .
What are the supported data types in Python?
Python has five standard data types :

Numbers : Python supports both integers and floating point numbers. There’s no type declaration to distinguish them; Python tells them apart by the presence or absence of a decimal point.
String : String is a sequence of characters. Python supports unicode characters. Generally strings are represented by either single or double quotes.
List : List is a versatile data type exclusive in Python. In a sense it is same as array in C/C++. But interesting thing about list in Python is it can simultaneously 

hold different type of data.
Tuple : Tuple is another data type which is a sequence of data similar to list. But it is immutable. That means data in a tuple is write protected. Data in a tuple is  written using parenthesis and commas.
Set : Set is an unordered collection of unique items. Set is defined by values separated by comma inside braces { }. Items in a set are not ordered.
Dictionary : Python Dictionary is an unordered sequence of data of key-value pair form. It is similar to the hash table type. Dictionaries are written within curly braces in the form key:value.
6 .
What are Python Operators ?
Operators are the constructs which can manipulate the value of operands.Python supports following operators.

Arithmetic Operators
Comparison Operators
Logical Operators
Assignment Operators
Bitwise Operator
Conditional Operators
7 .
What is Python Date and Time ?
The datetime classes in Python are categorized into main 5 classes.

date : Manipulate just date ( Month, day, year)
time : Time independent of the day (Hour, minute, second, microsecond)
datetime : Combination of time and date (Month, day, year, hour, second, microsecond)
timedelta : A duration of time used for manipulating dates
tzinfo :  An abstract class for dealing with time zones
8 .
Explain Python File Input and File Output ?
Python provides numerous built-in functions that are readily available to us at the Python prompt.

Some of the functions like input() and print() are widely used for standard input and output operations respectively. Let us see the output section first.
9 .
Explain Python functions.
A function is a section of program or a block of code that is written once and can be executed whenever required in the program.

There are two types of functions :

Built-In Functions : Functions that are predefined. We have used many predefined functions in Python.
User- Defined : Functions that are created according to the requirements.
10 .
How will you check in a string that all characters are digits?
isdigit() : Returns true if string contains only digits and false otherwise.