Answers for "*. python string"

0

python strings

type('Hellloooooo') # str

'I'm thirsty'
"I'm thirsty"
"n" # new line
"t" # adds a tab

'Hey you!'[4] # y
name = 'Andrei Neagoie'
name[4]     # e
name[:]     # Andrei Neagoie
name[1:]    # ndrei Neagoie
name[:1]    # A
name[-1]    # e
name[::1]   # Andrei Neagoie
name[::-1]  # eiogaeN ierdnA
name[0:10:2]# Ade e
# : is called slicing and has the format [ start : end : step ]

'Hi there ' + 'Timmy' # 'Hi there Timmy' --> This is called string concatenation
'*'*10 # **********
Posted by: Guest on November-21-2021
0

string pythhon

a = '''my name is 
coding boy
hasya'''

print(a)

#this is how string works
#it will print te value what you will enter
Posted by: Guest on January-12-2022

Python Answers by Framework

Browse Popular Code Answers by Language