You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
T = TypeVar("T")
def functionTab(first: T, second: T) -> T :
resultList = []
for i in first:
resultList.append(i)
for i in second:
resultList.append(i)
return resultList
list1 : Sequence[str] = ["dog", "cat"]
list2 : Sequence[int] = [1,2,3]
functionTab(list1, list2)
def functionTab(first: T, second: T) -> T :
resultList = []
for i in first:
resultList.append(i)
for i in second:
resultList.append(i)
return resultList
list1 : Iterable[int] = [1,2,3]
list2 : Iterable[str] = ["dog", "cat"]
functionTab(list1, list2)
Pytype permits one typeVar (T) for being a list of strings and list of integers.
OUTPUT:
Success: no errors found
The text was updated successfully, but these errors were encountered: