@mishram1271/

PLAB-S8_Task2.1

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
def moveChar(st, ch):
  len1 = len(st)
  newSt = ""
  newSt2 = ""
  for i  in range(0,len1):
    e = st[i]
    if (e != ch):
      newSt = newSt + e
    else:
      newSt2 = newSt2 + e
    toPrint = newSt + newSt2
  print(toPrint)

moveChar("hello", 'l')