Elso hazi#18
Conversation
| else: | ||
| continue | ||
| return(final_list) | ||
|
|
There was a problem hiding this comment.
cool solution, tho I'd rather use a key function, for clarity
basic/list2.py
Outdated
| set_nums = set(nums) | ||
| final_list= [] | ||
| for element in set_nums: | ||
| final_list.append(element) |
There was a problem hiding this comment.
a tesztek erre nem ternek ki, de mit gondolsz jo megoldast kapnal [1,2,3,4,2,1] listara?
basic/list2.py
Outdated
| return | ||
| new_list = list1 + list2 | ||
| new_list.sort() | ||
| return(new_list) |
There was a problem hiding this comment.
a lista amivel visszatersz ugyan jo. de az ido amig visszatersz vele nem linearis (Timsort->nlogn). Ne feledd hogy a ket kiindulasi lista mar rendezett.
| if count >= 10: | ||
| return('Number of donuts: many') | ||
| else: | ||
| return(f'Number of donuts: {count}') |
There was a problem hiding this comment.
ez milyen nyelven van? :) - Pythonban syntax errornak tunik. Mielott elkuldod a megoldasod, kerlek bizonyosodj meg rola, hogy a teszteken atmegy (mindegyik OK eredmennyel fut)
There was a problem hiding this comment.
Bocs, most latom hogy egy uj featuret hasznalsz. Meno 👍
basic/list1.py
Outdated
| final_list.append(element) | ||
| else: | ||
| continue | ||
| return(final_list) |
There was a problem hiding this comment.
nem rossz, de klasszabb lenne egy key= fuggvennyel
https://wiki.python.org/moin/HowTo/Sorting
basic/list2.py
Outdated
| for element in set_nums: | ||
| final_list.append(element) | ||
|
|
||
| return(final_list) |
There was a problem hiding this comment.
ez kicsit furcsa lett. Mit gondolsz helyes eredmenyt adna [1,2,1] listara?
No description provided.