make upper_list do not make str into list

This commit is contained in:
Fu Hanxi 2020-05-06 12:00:52 +08:00
parent d06d2a2b9f
commit e99172fbac

View File

@ -41,7 +41,7 @@ def upper_list(text):
if not text: if not text:
return text return text
if isinstance(text, string_type): if isinstance(text, string_type):
res = [text.upper()] res = text.upper()
else: else:
res = [item.upper() for item in text] res = [item.upper() for item in text]
return res return res