Skip to content

Conversation

@geroldcsendes
Copy link

No description provided.

else:
continue
return(final_list)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ez milyen nyelven van? :) - Pythonban syntax errornak tunik. Mielott elkuldod a megoldasod, kerlek bizonyosodj meg rola, hogy a teszteken atmegy (mindegyik OK eredmennyel fut)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bocs, most latom hogy egy uj featuret hasznalsz. Meno 👍

basic/list1.py Outdated
final_list.append(element)
else:
continue
return(final_list)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ez kicsit furcsa lett. Mit gondolsz helyes eredmenyt adna [1,2,1] listara?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants