Q:

example of lists in python programming

0

give me example of lists in python programming

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

name=input('Please Enter Name: ')
firstchar=name[0]
repeated=False
for i in range(1,len(name)):
    if firstchar==name[i]:
        print('"',name,'" should be inserted to list, because letter','"',firstchar,'"',' repeated')
        repeated=True
        li=[]
        for c in name:
            li.append(c)
        break

if repeated==False:
  print('"',name,'" should not be inserted to list because , letter','"',firstchar,'"',' not repeated')

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now