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 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz