Programming Examples

Python program to inter list of string and create a new list that consist of those strings with their first characters removed


Ask the user to inter list of string. Create a new list that consist of those strings with their first characters removed.

Solution

mylist=eval(input("Enter List with string elements : "))
print('Original List ',mylist)
a=0
for b in mylist:
    mylist[a]=b[1:len(b)]
    a=a+1
print('Result List ',mylist)
Output

Enter List with string elements : ['infomax','computer','academy']

Original List  ['infomax', 'computer', 'academy']

Result List  ['nfomax', 'omputer', 'cademy']

CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad