ask the user to enter a list of Strings create a new list that consists of those strings with their first characters removed !!
In Python plzz help !!
Answers
3) lst = []
n = int(input("Enter number of elements: "))
for i in range(0, n):
a = int(input("Enter Number Between 1 to 12"))
lst.append(a)
for n, i in enumerate(a):
if i == 1:
lst[n] = 10
print(lst)
2) lst = []
n = int(input("Enter number of elements: "))
for i in range(0, n):
a = int(input())
lst.append(a)
lst2 = []
n2 = int(input("Enter number of elements: "))
for j in range(0, n2):
b = int(input())
lst.append(b)
lst3 = lst + lst2
print(lst3)
1) def reverseList(A, start, end):
while start < end:
A[start], A[end] = A[end], A[start]
start += 1
end -= 1
A = [1, 2, 3, 4, 5, 6]
print(A)
reverseList(A, 0, 5)
print("Reversed list is")
print(A)
Answer:
Explanation have:
x = ['76776', '766', '71']
I am trying to return
x = ['6776', '66', '1']
So far I have
for i in x:
if i[0] = '7':
x.replace('7', ''):