write a python program to print the characters from word the word "GRAPHICS" using for loop .
Answers
Answered by
2
Answer:
Write a python program to print the characters from word the word "GRAPHICS" using for loop.
Explanation:
# program to split string into character
def split_str(s): //function
return [ch for choice in s]
# main code
string = "GRAPHICS"
print("string: ", string)
print("split string...")
print(split_str(string)) //print characters
Output:-
string: GRAPHICS
split string...
['G', 'R', 'A', 'P', 'H', 'I', 'C', 'S']
Similar questions
Biology,
5 months ago
Physics,
5 months ago
English,
5 months ago
Math,
11 months ago
English,
11 months ago
Social Sciences,
1 year ago
Social Sciences,
1 year ago