Horje
for char in string python Code Example
python char at
>>> s = "python"
>>> s[3]
'h'
>>> s[6]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IndexError: string index out of range
>>> s[0]
'p'
>>> s[-1]
'n'
>>> s[-6]
'p'
>>> s[-7]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IndexError: string index out of range
>>> 
how to get any letter of a string python
Random = "Whatever"#you can put anything here
words2 = Random.split(" ")
print('number of letters:')#you can delete this line...
print(len(Random))#and this one. these lines just Tell you how many 
#letters there are
while True:#you can get rid of this loop if you want
    ask = int(input("what letter do you want?"))
    print(Random[ask-1])
for char in string python
string = "some string"

for x in string:
  	print(x, end=' ')




Python

Related
python code to encrypt and decrypt a stringn with password Code Example python code to encrypt and decrypt a stringn with password Code Example
puython is not equal to Code Example puython is not equal to Code Example
boids algorithm Code Example boids algorithm Code Example
rc.local raspberry pi Code Example rc.local raspberry pi Code Example
what does it mean when i get a permission error in python Code Example what does it mean when i get a permission error in python Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7