Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def main():
- sLine=input("Enter a string to jamesl'ify it:\n")
- sLine = sLine+" "
- sOut=""
- arrPunc = ["\'","\"",";",":","(",")","<",">","!","@","#","$","%","^","&","*","+","=","`","~","/","\\","{","}","[","]","|","_","-"]
- for k in range(len(sLine)):
- if (sLine[k] in arrPunc):
- sOut+="jamesl"+sLine[k]
- elif (sLine[k] == " "):
- sOut+="jamesl"
- if k+1<len(sLine):
- if not(sLine[k+1] in arrPunc):
- sOut+=" "
- else:
- continue
- else:
- continue
- print(sOut)
- if __name__=="__main__":
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement