蹲一個大神解答,拜托拜托
寫將任何句子轉換為VAPORWAVE句子的函數。VAPORWAVE句子將所有字母都轉換為大寫,并在每個字母(或特殊字符)之間添加2個空格以創建此VAPORWAVE效果。
例子:
??vaporcode("Lets go to the movies") // output => "L ?E ?T ?S ?G ?O ?T ?O ?T ?H ?E ?M ?O ?V ?I ?E ?S"
??vaporcode("Why isn't my code working?") // output => "W ?H ?Y ?I ?S ?N ?' ?T ?M ?Y ?C ?O ?D ?E ?W ?O ?R ?K ?I ?N ?G ??"
2019-10-23
def?vaporcode(str):????b=[]????for?a1?in?str:????????if?a1=='?':????????????continue????????b.append(a1)????s='??'.join(b)????print?(s.upper())vaporcode("Why?isn't?my?code?working?")