Answers for "string print in python"

16

how to create string in python

string = "this is string"
#or
string = 'this is also string'
Posted by: Guest on April-15-2020
1

python print function

print('Hello,World!')
Posted by: Guest on March-20-2021
0

python print

print('Message')
Posted by: Guest on September-29-2020
0

print in python

# This prints out the value provided by the user

print("Hello World\n")
Posted by: Guest on December-14-2020
0

how to print in python

#printing inputs
print(input("whatever u want to say "))
#or u can use preloaded inputs
input_value=input("whatever u want to say ")
print(input_value)
Posted by: Guest on February-05-2021
0

python string tutorial

print("Hello\nworld") #for a new line "\n"
print("I want to type \"Hello world\" but I can't") #for writing characters used in coding

phrase = "Hello World" #assigning a value
print(phrase) #for printing values

print(phrase.upper()) #for changing the string to upper case. 
# If you change "upper" out with "lower" it will changing the string to lower case.

print(len(phrase)) # printing the length of the string

print(phrase[0]) # giving the first letter of the string
# 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

print(phrase.index("e")) # printing where in the string "e" is
print(phrase.index("llo"))# printing where in the string "llo" is
Posted by: Guest on November-21-2020

Python Answers by Framework

Browse Popular Code Answers by Language