format-strings

Run Settings
LanguagePython
Language Version
Run Command
name = "rafaath" age = 23 # print("Hello " + name + " I am "+ str(age) + " Years old!") # The above method is a pain in the ass as we need to type convert shit and also # if we want to extend and add values and strings it might be a pain in the ass. # Due to this reason we use a formatted strings. print(f"Hello {name}, you are {age} years old") # The above code is a lot cleaner compared to the 4th line code! # In python 2 we had something different, this works on python 3 as well - .format print("Hello {1}, you are a pussy at {0} years old".format(name,age)) # as nums start from 0.
Editor Settings
Theme
Key bindings
Full width
Lines