Python Basic understand before study Django / Flask
variable Variable write with name then content e.g : x = 'hello python'
Data Type Numbers, string, List, Tuple, Dictionary e.g : x = 5 print(x) //result 5 type(x) //result int
Concatenation use + like javascript e.g : x = 'learning' y = 'python' print(x + ' ' + y)
Escaping use
e.g : print('Hello anam's friend') //'Hello anam's friend
mew line use \n e.g : print('first line \n new line')
tab use \t
string method use capitalize(), replace('string1','string2'), etc e.g : x = 'title' print(x.capitalize())
plus, min, max, round e.g : x = 10 y = 20 print(x+y) //result 30 max(x,y,1,50,2) //result 50 min(x,y,1,50,2) //result 1
print number and string together e.g : x = 1000 print("the price is", x) print("the price is" + str(x))