12 lines
250 B
Python
12 lines
250 B
Python
from dataclasses import dataclass
|
|
|
|
|
|
def return_list(txt: str or [str]) -> [str]:
|
|
_list = []
|
|
if type(txt) in (tuple, list):
|
|
_list = txt
|
|
elif type(txt) in (str, int):
|
|
_list = [txt]
|
|
return _list
|
|
|
|
print(return_list("xxx")) |