Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. def censurera(ord1):
  2.     nytt_ord = ""
  3.     for k in range(len(ord1)):
  4.         if(ord1[k] == 'b'):
  5.             nytt_ord = nytt_ord + 'X'
  6.         else:
  7.             nytt_ord = nytt_ord + ord1[k]
  8.     return nytt_ord
  9.  
  10. censurerat_ord = censurera("aaaabbbbcccc")
  11. print(censurerat_ord)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement