# Printing, the basics of Python...# Btw this is how you print a statement or anything in the terminal/console.print("your printing statement")# Above basically makes use of a built-in function called print which just# shows your writing in the console. You can print variables also using print.# Very easy to use. Hope I helped. Thanks!# By Codexel (yea, i changed my username AGAIN...)
# How to print in Pythonprint("Hello World!")# How to print multiple words using comma separatorprint("Hi","there")# How to separate the objects if there is more than one.print("Chelsea","Liverpool", sep="-vs-")#Specify what to print at the end. Default is '
'
print("Hello World",end="!")# or use empty string "" for no new lineprint("Hello World",end="")
# Simple Print:print("Hello World!")# Formatting message in python3.6- :
name ="World"print("Hello {}!".format(name))# Formatting message in python3.7+ :
name ="World"print(f"Hello {name}!")
# The print() funtion in python:print("Hello World!")# Prints Hello World to the terminal,# with a line break afterwards.print(65+23)# Prints 88 to the terminal, with a line breakprint("There is no line break here!", end="")# Prints There is no line break here to the terminal, but replacing the line# break with nothing.# The end parameter is what to put after the text. It's default value is a "
",# or line break
printElements(){
let currentNode = this.front;
let output ='';while(currentNode){
output = ` ${output}${currentNode.value}-> ` ;
currentNode = currentNode.next;}
console.log(`${output}null`);return true
}}//if you find this answer is useful ,//upvote ⇑⇑ , so can the others benefit also . @mohammad alshraideh ( ͡~ ͜ʖ ͡°)
print("Type you'r string here!")# String is something that is in 2 of "" this is called string# Print function runs the function to print text in python# You type print() first# Give it "" double quotes# Type whatver you want to print in that double qoutes
2+1#Addition is done by Python, but doesn't show us the answerprint(2-1)#output - 1 (This will solve and show us the answer, 2,1 and 3 all are integers)
x =2*1print(x)#output - 2 (We have printed the varible and got the answer, all are integers)
x =2
y =1print(x / y)#output - 2.0 (When division is done answer is given as a float)
x ="2"
y ="1"print(x + y)#output - 21 (When two strings are added, it concatenate and the answer # is also a string)