@mishram1271/

PLAB-S8_2.2

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
def moveChar(st):
  len1 = len(st)
  newSt = ""
  newSt2 = ""
  for i  in range(0,len1):
    f = st[i]
    if (f != st[0]):
      newSt = newSt + f
    else:
      newSt2 = newSt2 + f
    toPrint = newSt + newSt2
  return toPrint
  # 
  # print(newList)
def aBcd(list1):
  newList = []
  l = len(list1)
  for i in range(0,l):
    st = list1[i]
    n = moveChar(st)
    newList.append(n)
  print(newList)
aBcd(["dad", "car", "tiptop"])