Activity
Mon
Wed
Fri
Sun
Oct
Nov
Dec
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
What is this?
Less
More

Memberships

1 contribution to Pivot2Tech
Python Help
can someone explain why i keep getting error here as ive copied it from the powerpoints of the data course
Python Help
2 likes • Dec '24
Groceries is being treated as a Tuple, instead of a List. Tuples can not be modified. So you need to use a list in this case. Write the list in square brackets as follows: groceries = ["rice", ....] I think python defaults something separated by commas as tuples, instead of list. Tho usually I thought parenthesis ( ) are used for tuples. But for lists, Brackets [ ] are always used in Python.
1-1 of 1
Sikandar Rao
1
3points to level up
@sikandar-rao-8078
Working towards an income

Active 14h ago
Joined Dec 27, 2024
Powered by