python

basics of python for a video tutorial go here https://youtube.com/playlist?list=PLu0W_9lII9agICnT8t4iYVSZ3eykIAOME print(“syntax of print “)#                                           use # for single line comment”’multi line commentis this .”’#                                           syntax to remove space from end .#                                            what we right between end=”” will come in between ‘””‘thisprint(“for join two print statment “, end=””)print(“for this “)#                                               also this workprint(“for join two print statment”, “for this”)#                                            to declere a variablename = ‘hello world’name1 = 65#                                            to print variableprint(name)print(name1)#                                           n is a new line charecter#                                            to print  in code you have to writeprint(” your name is \narry “)#                                                   to write ” in codeprint(” c: “narry” “)#                                                t is a tab space between themprint(“hello ttt world”)#                                               type of varriablevar1 = “hello”var2 = 34var3 = 67.8555var4 = “world”#                                               to print the type of variabeprint(type(var1))#                                               concetinate the stringprint(var1 + var4)#                                               type casting  means changing one variable type to anothervar10 = “32”var11 = “45”print(int(var10) + int(var11))#                                               to print str more than one timeprint(“hello ” * 3)#                                               to take input from userinpuut = input()#                                                  inpuut variable will always be a strprint(type(inpuut))#                                                   string slicingstr1 = “kavya is a good boy”#                                                   we can slice like#                                               the forth word will printprint(str1[4])#                                                this will print 1 to 9 words including space’9th word will be excluded’print(str1[1:9])#                                          if in slicing [1:] it will take full#                                         [:5] 0 as by default#                                          [0:5:] till 5  [0:5:2] will skip one#                                           [-4:-5 ] will also work#                                             if we write print(str1.endswith(“boy”)) it will print true#                                             print(str1.count(“b”) )    it will count all the b in my str#                                              str1.capitalise     will capital full string#                                               str1.find(“is”)    will find is in str# list syntax# same  slysinggrossery = (“harpic”, “deo”, “bhindi”, “pop”)nim = (5, 6, 3, 5, 2, 0)print(nim[2])nim.append(1, 9, 8)  # will add this to end#  tuple canot be changetp = (1, 5, 8)# to resevers two var   a,b = b, a# dictonaryd1 = {“kavya”: “burger”, “han”: “egg”}# del funtion will delete what you whishdel (d1[“han”])# sytax of seta=set(1, 3, 5, 7)# set does not append same values# syntax of if else# if condition :#   code# else :#   code for intermediate and advanced python go here diceroll