/Python

using python in all aspects

Primary LanguageJupyter Notebook

Python

using python in all aspects. ---- ITS BEST TO LEARN A LITTLE THEORY AND THEN TRY CODING THESE SAMPLES ----

basics.py

It just tells you about how to print something, creating variables in python, asking for input from the user and using for loop.

flow_control.py

In this different ways of using variable and then using them efficiently in if-else statments is explained. Nested if-else example is also given. Using FOR loop and WHILE is also available.

list.py

Basically a list is any variable where, value of variables is enclosed in square brackets([]). It tells about ways to use list and using its functions.

range.py

We have used range in for loop. It's the same range, but in this all it's uses are explained. It also tells about creating a List by using range.

tuples.py

In this the value of variable is in double quote("") and separated by a comma(,). A tuple within a tuple can also be created by using parentheses. It's uses and functions are explained.

binary_and_hexadecimal.py

In this binary and hexadecimal numbers is explained. 0b for binary and 0x for hexadecimal is used.

dictionaries.py

A dictionary is a variable where data is enclosed between curly braces. A dictionary variable contains key and value, which is separated by a colon(:). First a key is entered then the value. Various ways to use it's functions is explained.

join.py

It tells about how to use join function. It used to join list's elements. Sample.PNG (photo) is used to create dictionaries in this file.

challenge_dictionary_answer.py

It is the solution of challenge_dictionary.txt. Please try it yourself, then look for the answer.

sets.py

In sets data is saved in double quotes("") and separated by a comma(,) and enclosed between curly braces({}) like a dictionary, but with no keys. Its functions and types of sets are explained.

IO_from_file.py

In this how to read from a .txt file is explained. It also explains how to manipulate the data of the .txt file.

write.py

In this .txt file is created by usingg list and tuple. Manipulating the file and printng the data efficiently from the file is explained.

binary.py

It tells about writing a binary file and reading from the binary file.

picklesample.py

It explains about the pickle module of the python. It tells about creating a pickle file using list or tuple and reading efficiently from the pickle file. It is just like serialization in java.

shelvesample.py

It tells about shelve module of the python. It convertes data(list,dictionary,tuple) into the database. It explains about all the important function used by shelve to create database and use data from the database.

Source:

--- Udemy Course: Python the complete python developer course ---