I am deeply thankful to my advisors Dr. Shahid Mahmood Awan and Dr. Bilal Wajid for his inspiration and guidance throughout my studies at the Department of Information System, School of Business and Economics, University of Management & Technology. In the past 2 Years, his invaluable support and directions always helped me improve professional and academic skills. It has been an honor being his student.
I am very grateful to my friends Mr. Irfan Kareem, Mr.Muneeb Ul Haque, Mr.Mansoor Waheed, Mr.Bilal Iqbal & Mr.AbdulRehman Azam for their friendship and help.
-
- 1.1 Programming basics
- 1.2 Reasons to become a Python Developer
- 1.3 Open source Software Characteristics
- 1.4 Python History
- 1.5 Characteristics and Features of Python
- 1.5.1 Disadvantages
- 1.5.2 REPL
- 1.6 Python Overview
- 1.7 What is Anaconda, Jupyter Notebook and Spyder in Python
- 1.8 Python IDE
- 1.9 Jupyter Notebook
- 1.10 How to check the installed version of Python
- 1.11 How to check the Libraries version use in the Current Jupter Notebook
- 1.11.1 Install watermark
- 1.11.2 Libraries version
-
- 2.1 Values
- 2.1.1 Conversion Functions
- 2.1.2 issubclass
- 2.1.3 isinstance
- 2.1.4 conjugate
- 2.2 Print
- 2.3 Python Variables
- 2.3.1 Python Variables Assignment
- 2.3.2 Multiple Assignment
- 2.3.3 Variables Names
- 2.3.4 Python Reserved Keywords List
- 2.3.5 isidentifier
- 2.3.6 iskeyword
- 2.3.7 Choosing mnemonic variable names
- 2.3.8 Finding Variables
- 2.3.9 Deleting Variables
- 2.3.10 How to Swap Two Variables values
- 2.4 How to get the address in Python
- 2.5 Comments in Python Language
- 2.6 Python Help
- 2.7 Asking the user for input
- 2.8 Output of the last Function
- 2.9 History Commands
- 2.1 Values
-
- 3.1 Numbering Systems
- 3.1.1 Decimal Number System
- 3.1.2 Binary Number System
- 3.1.3 Octal Number System
- 3.1.4 Hexadecimal Number System
- 3.2 Conversion Functions
- 3.3 Operators and Operands
- 3.3.1 Special Note
- 3.3.2 Python Expressions
- 3.3.3 Order of Operations
- 3.4 Types of Python Operators
- 3.4.1 Arithmetic Operators
- 3.4.1.1 Addition
- 3.4.1.2 Subtraction
- 3.4.1.3 Multiplication
- 3.4.1.4 Division
- 3.4.1.5 Modulus
- 3.4.1.6 Exponent
- 3.4.1.7 Floor Division
- 3.4.2 Assignment Operators
- 3.4.2.1 Assignment Equal
- 3.4.2.2 Add AND
- 3.4.2.3 Subtract AND
- 3.4.2.4 Multiply AND
- 3.4.2.5 Division AND
- 3.4.2.6 Modulus AND
- 3.4.2.7 Exponent AND
- 3.4.2.8 Floor Division AND
- 3.4.3 Comparison or Relational Operators
- 3.4.3.1 Equal
- 3.4.3.2 Not Equal To
- 3.4.3.3 Greater Than
- 3.4.3.4 Less Than
- 3.4.3.5 Greater Than Equal To
- 3.4.3.6 Less Than Equal To
- 3.4.4 Logical Operators
- 3.4.5 Identity Operators
- 3.4.5.1 is
- 3.4.5.2 is not
- 3.4.5.3 difference between is and ==
- 3.4.6 Bitwise Operators
- 3.4.6.1 Binary AND
- 3.4.6.2 Binary OR
- 3.4.6.3 Binary XOR
- 3.4.6.4 Binary 1s Complement
- 3.4.6.5 Binary Left Shift
- 3.4.6.6 Binary Right Shift
- 3.4.7 Membership Operators
- 3.4.1 Arithmetic Operators
- 3.5 Functions related to ASCII conversion
- 3.1 Numbering Systems
-
- 4.1 Pyhon String
- 4.1.1 Rules Applied in String Construction
- 4.1.2 Special Case
- 4.2 Escape Sequence
- 4.3 Python String Operations
- 4.3.1 immutable
- 4.3.2 lenght of the string
- 4.3.3 Casting
- 4.3.4 String slices
- 4.3.5 getitem
- 4.3.6 concatenated string
- 4.3.7 replace
- 4.3.8 strip
- 4.3.9 lstrip
- 4.3.10 lower
- 4.3.11 islower
- 4.3.12 upper
- 4.3.13 isupper
- 4.3.14 capitalize
- 4.3.15 startswith
- 4.3.16 endswith
- 4.3.17 format_map
- 4.3.18 casefold
- 4.3.19 Center
- 4.3.20 expandtabs
- 4.3.21 Index
- 4.3.22 find
- 4.3.23 rindex
- 4.3.24 rfind
- 4.3.25 isalnum
- 4.3.26 isnumeric
- 4.3.27 isdigit
- 4.3.28 isdecimal
- 4.3.29 isalpha
- 4.3.30 isidentifier
- 4.3.31 zip
- 4.3.32 title
- 4.3.33 istitle
- 4.3.34 swapcase
- 4.3.35 split
- 4.3.36 rsplit
- 4.3.37 rpartition
- 4.3.38 partition
- 4.3.39 isprintable
- 4.3.40 Repeat a string
- 4.3.41 String Methods
- 4.3.42 String Count
- 4.3.43 Python String Comparison
- 4.3.44 String Join
- 4.3.45 isspace()
- 4.3.46 splitlines()
- 4.3.47 contains
- 4.3.48 end
- 4.3.49 max
- 4.3.50 encode
- 4.3.51 add
- 4.3.52 maketrans
- 4.3.53 translate
- 4.4 String Formatting Operator
- 4.4.1 Basic formatting for default, positional and keyword arguments
- 4.4.2 Simple number formatting
- 4.4.3 Number formatting with padding for int and floats
- 4.4.4 Number formatting for signed numbers
- 4.4.5 Number formatting with left, right and center alignment
- 4.4.6 String formatting with padding and alignment
- 4.4.7 Truncating strings with format
- 4.4.8 Formatting dictionary members using format
- 4.4.9 Dynamic formatting using format
- 4.1 Pyhon String
-
- 5.1 List
- 5.1.1 Nested List
- 5.1.2 Empty List
- 5.1.3 List slices
- 5.1.4 Lists are mutable
- 5.1.5 Python List Operations
- 5.1.5.1 in
- 5.1.5.2 not in
- 5.1.5.3 concatenates list
- 5.1.5.4 extend
- 5.1.5.5 repeat list
- 5.1.5.6 append
- 5.1.5.7 insert
- 5.1.5.8 sort
- 5.1.5.9 reverse
- 5.1.5.10 copy
- 5.1.5.11 count
- 5.1.5.12 Length
- 5.1.5.13 sum
- 5.1.5.14 max
- 5.1.5.15 min
- 5.1.5.16 index
- 5.1.5.17 Deleting elements
- 5.1.5.17.1 pop
- 5.1.5.17.2 del operator
- 5.1.5.17.3 remove
- 5.1.5.17.4 clear
- 5.1.5.18 Lists and Strings
- 5.1.5.19 List Methods
- 5.1.5.20 strip
- 5.1.5.21 lstrip
- 5.1.5.22 rstrip
- 5.1.5.23 split
- 5.2 Dictionary
- 5.2.1 Create dictionary
- 5.2.1.1 Nested Dictionary
- 5.2.1.2 keys
- 5.2.1.3 values
- 5.2.1.4 items
- 5.2.1.5 Accessing Items
- 5.2.1.6 mutable
- 5.2.1.7 Dictionary Length
- 5.2.1.8 Adding Items
- 5.2.1.9 Removing Items
- 5.2.1.9.1 pop dictionary
- 5.2.1.9.2 del dictionary
- 5.2.1.9.3 popitem
- 5.2.1.9.4 clear dictionary
- 5.2.10 fromkeys
- 5.2.11 setdefault
- 5.2.12 update
- 5.2.13 Copy
- 5.2.14 Dictionary Methods
- 5.2.1 Create dictionary
- 5.3 Tuple
- 5.3.1 Create a Tuple
- 5.3.2 Tuple-Vs-List
- 5.3.2.1 getsizeof
- 5.3.2.2 time efficiency
- 5.3.3 Access Tuple Items
- 5.3.4 Replace Value
- 5.3.5 Add Items
- 5.3.6 Remove Items
- 5.3.7 Tuple Length
- 5.3.8 Count
- 5.3.9 index
- 5.3.10 Convert tuple to list
- 5.3.11 Tuple Methods
- 5.3.12 Swap tuple elements in list of tuples
- 5.3.13 Sort tuple elements in list of tuples
- 5.4 Set
- 5.4.1 Create a Set
- 5.4.2 empty set
- 5.4.3 Add Items
- 5.4.4 update
- 5.4.5 Length of a Set
- 5.4.6 remove
- 5.4.7 discard
- 5.4.8 pop
- 5.4.9 clear
- 5.4.10 copy
- 5.4.11 Set difference
- 5.4.12 difference_update
- 5.4.13 intersection
- 5.4.14 intersection_update
- 5.4.15 isdisjoint
- 5.4.16 issubset
- 5.4.17 symmetric_difference
- 5.4.18 symmetric_difference_update
- 5.4.19 union
- 5.4.20 issuperset
- 5.4.21 Singleton Set
- 5.4.22 Finite Set
- 5.4.23 Infinite Set
- 5.4.24 Equal Sets
- 5.4.25 Equivalent Sets
- 5.4.26 Universal Set
- 5.4.27 Subset
- 5.4.28 Power Set
- 5.4.29 Proper Subset
- 5.4.30 Super Set
- 5.4.31 Proper Superset
- 5.4.32 Set Methods
- 5.5 frozenset
- 5.6 Ranges
- 5.7 Bytes
- 5.7.1 Empty Bytes
- 5.8 bytearray
- 5.8.1 empty bytearray
- 5.9 Summary
- 5.1 List
-
- 6.1 if statements
- 6.2 if else Statements
- 6.2.1 elif Statements
- 6.3 Nested Statements
-
- 7.1 Functions
- 7.1.1 Function Parameters
- 7.1.2 Local Variables
- 7.1.3 The global statement
- 7.1.4 Default Argument Values
- 7.1.5 Keyword Arguments
- 7.1.6 The return statement
- 7.1.7 DocStrings
- 7.1.8 lambda
- 7.1 Functions
-
- 8.1 while loop
- 8.1.1 A while Loop with else
- 8.1.2 Positioning the Counter Increment
- 8.1.3 The break Statement
- 8.1.4 The continue Statement
- 8.2 for loop
- 8.2.1 break statment
- 8.2.2 The continue Statement
- 8.2.3 The range Function
- 8.2.4 A for Loop with else
- 8.2.5 Nested for loops
- 8.2.6 Pass Statment
- 8.1 while loop
-
- 9.1 Introduction
- 9.2 Import Library for Path and File Management
- 9.3 Get working Directory
- 9.4 Change working Path
- 9.5 List Current Directory
- 9.6 Make a new Directory in Current Directory
- 9.7 Delete Directory in Current Directory
- 9.8 Rename Directory in Current Directory
- 9.9 Rename File
- 9.10 stat in os
- 9.10.1 Size of the File
- 9.10.2 Time of the Last Modification
- 9.11 walk
- 9.12 Exists Path
- 9.13 isdir
- 9.14 isfile
- 9.15 Python script to rename a folder if the folder name similar to line in a text file to that exact line
- 9.16 os Available Methods
-
- 10.1 Import Library for Math Functions
- 10.2 Power and Logarithmic Functions
- 10.3 Trigonometric Functions
- 10.3.1 Return the cosine of x radians
- 10.3.2 Return the sine of x radians
- 10.3.3 Return the tangent of x radians
- 10.3.4 Return the arc cosine of x radians
- 10.3.5 Return the arc sin of x radians
- 10.3.6 Return the arc tan of x radians
- 10.4 Number-theoretic and representation functions
- 10.5 Constants
- 10.6 Special functions
-
- 11.1 Import collections Library
- 11.2 Counter
- 11.2.1 empty counter
- 11.2.2 a new counter from a mapping
- 11.2.3 a new counter from keyword args
- 11.2.4 items
- 11.2.5 keys
- 11.2.6 values
- 11.2.7 sum of values
- 11.2.8 most_common
- 11.2.9 elements
- 11.2.10 sorted
- 11.2.11 list unique elements
- 11.2.12 join
- 11.2.13 del
- 11.2.14 update
- 11.2.15 clear
- 11.2.16 reduced count
- 11.2.17 subtract
- 11.2.18 minus
- 11.2.19 Acccss Counter Elements
- 11.2.20 convert to a set
- 11.2.21 convert to a regular dictionary
- 11.2.22 addition
- 11.2.23 intersection
- 11.2.24 union
- 11.2.25 Unary addition
- 11.2.26 Unary subtraction
- 11.3 namedtuple
- 11.3.1 Access Elements
- 11.3.2 Arithmetic Operations
- 11.3.3 convert to a dictionary
- 11.3.4 convert from a dictionary
- 11.3.5 replace
- 11.4 defaultdict
- 11.5 deque
- 11.5.1 append
- 11.5.2 appendleft
- 11.5.3 pop
- 11.5.4 popleft
- 11.5.5 clear
- 11.5.6 extend
- 11.5.7 extendleft
- 11.5.8 rotate
- 11.5.9 reversed
-
- 12.1 Import random Library
- 12.2 random
- 12.3 uniform
- 12.4 randint
- 12.5 randrange
- 12.6 normalvariate
- 12.7 choice
- 12.8 sample
- 12.9 choices
- 12.10 shuffle
- 12.11 random seed
- 12.12 getrandbits