Answer to Question #256496 in Python for rasi

Question #256496

28.Take a list with 6 different characters and print the 2nd and 3rd character?

 


1
Expert's answer
2021-11-02T08:22:07-0400

# Python Program to Access

# characters of String


String1 = ['p', 'y', 't', 'h', 'o', 'n']

print("Initial String: ")

print(String1)


# Printing Second character

print("\nSecond character of String is: ")

print(String1[1])


# Printing Third character

print("\nThird character of String is: ")

print(String1[2])


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS