A print funtion is a way to print data in the console use: print("Hello World") x = "Hello World" print(x) x = 5 + 5 print(str(x))
Here is what the above code is Doing:
1. print(“Hello World”)
– This is a print function that prints “Hello World” in the console
2. x = “Hello World”
– This is a variable that stores the string “Hello World”
3. print(x)
– This is a print function that prints the variable x in the console
4. x = 5 + 5
– This is a variable that stores the value of 5 + 5
5. print(str(x))
– This is a print function that prints the variable x in the console
– The str() function is used to convert the value of x to a string