We generally know that to print a string in python we need to write simply -
print (" You are my sunshine , if you are here , then I am fine !")
But to print a new line we need to write something like this -
print (" You are my sunshine ,\n if you are here ,\n then I am fine !")
But sometimes we need the raw string, I don't know when but a hacker friend of mine told me it helps while hacking as it is related to raw string searching. To print a raw string write -
print ( r"You are my sunshine ,\n if you are here ,\n then I am fine !")
and it will print this -
"You are my sunshine ,\n if you are here ,\n then I am fine !"
Nice one!!!
print (" You are my sunshine , if you are here , then I am fine !")
But to print a new line we need to write something like this -
print (" You are my sunshine ,\n if you are here ,\n then I am fine !")
But sometimes we need the raw string, I don't know when but a hacker friend of mine told me it helps while hacking as it is related to raw string searching. To print a raw string write -
print ( r"You are my sunshine ,\n if you are here ,\n then I am fine !")
and it will print this -
"You are my sunshine ,\n if you are here ,\n then I am fine !"
Nice one!!!
No comments:
Post a Comment