Q. Ask the user to enter a list of string. Create a new list that consist of those strings with there first characters removed.
You can understand by Watching video :-
Answer :-
lst = eval(input ("Enter the list of string = ")) for i in range(len(lst)) : lst [ i ] = lst [ i ] [ 1:] print("New list = ",lst)
Output :-
Enter the list of string = ["Path","Walla","Portal","Express"]
New list = ['ath', 'alla', 'ortal', 'xpress']
>>>
Enter the list of string = ["Python","C++","Java","CSS"]
New list = ['ython', '++', 'ava', 'SS']
>>>
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )