May-30-2022, 03:57 AM
dynamic variable names in general practice (specific cases can be shown to be OK) should not be done because risks like name collision and security. that PHP (and others) allow this does not reduce these risks. Python provides one or more isolated name spaces for this called dictionaries. if all indexes are integers, lists can be used. but a dictionary helps keep your project simple and any hashable type can be used. even a tuple containing only hashable data can be used as a "name" (actually a key).
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.