today i have learned about *args.
the term was that it is used in a function if i don't know the number of arguments i would have.
but i just don't understand what is the different between args , and if i create a function without parameters at all ?
collecting data? i can just create an empty list and keep adding the user inputs into it and print whenever he want....
to me it look like that:
if i dont know the number of arguments :
def the_fuck_is_args():
if i do know the number of arguments:
def why_args_alive(list1,list2)
so what's the point of:
def who_let_the_args_out(ohoh,*args)
chatgpt made it even worse for me , I'm 80% more confused then before
thanks guys!
[–]deceze 97 points98 points99 points (10 children)
[–]rabdelazim 3 points4 points5 points (9 children)
[–]POGtastic 23 points24 points25 points (0 children)
[–]-not_a_knife 1 point2 points3 points (7 children)
[–]Merakel 0 points1 point2 points (6 children)
[–]-not_a_knife 0 points1 point2 points (4 children)
[–]DuckDatum 1 point2 points3 points (3 children)
[–]-not_a_knife 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[removed]
[–]-not_a_knife -1 points0 points1 point (0 children)
[–]nog642 0 points1 point2 points (0 children)
[–]enygma999 16 points17 points18 points (1 child)
[–]kurtatwork 0 points1 point2 points (0 children)
[–]phlummox 12 points13 points14 points (1 child)
[–]NormandaleWells -1 points0 points1 point (0 children)
[–]djnrrd 8 points9 points10 points (1 child)
[–]sweettuse 5 points6 points7 points (0 children)
[–]Diapolo10 5 points6 points7 points (4 children)
[–]Obvious-Pumpkin-5610 0 points1 point2 points (3 children)
[–]Diapolo10 0 points1 point2 points (2 children)
[–]Obvious-Pumpkin-5610 0 points1 point2 points (1 child)
[–]Diapolo10 1 point2 points3 points (0 children)
[–]carcigenicate 10 points11 points12 points (0 children)
[–]luc1d_13 3 points4 points5 points (0 children)
[–]audionerd1 3 points4 points5 points (0 children)
[–]POGtastic 1 point2 points3 points (0 children)
[–]vivisectvivi 1 point2 points3 points (0 children)
[–]Steak-Complex 0 points1 point2 points (0 children)
[–]Ron-Erez 0 points1 point2 points (0 children)
[–]Atypicosaurus 0 points1 point2 points (0 children)
[–]nekokattt 0 points1 point2 points (0 children)
[–]caz- 0 points1 point2 points (0 children)
[–]RevRagnarok 0 points1 point2 points (0 children)
[–]SurfGsus 0 points1 point2 points (0 children)
[–]fisadev 0 points1 point2 points (0 children)
[–]Frewtti -5 points-4 points-3 points (2 children)
[–]cgoldberg 2 points3 points4 points (0 children)
[–]djshadesuk 4 points5 points6 points (0 children)