You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is much cleaner to construct a string in one go as the string concatenate operator creates a new string (strings are immutable by default). While operations such as these are inconsequential due to scale, it is good practice to do the following:
output="\n".join(prereqs_list)
If you're iterating over a more complex structure and need to extract some terms, you can do it as follows:
Cutting down to one line. This also solves the asymmetry of requisites where you may get a result like "MTH1030, ENG1005," with a trailing comma. This can e found in the unit_embed.py file, on lines 35, 43, 47, and 50-54.
The text was updated successfully, but these errors were encountered:
In place of say:
It is much cleaner to construct a string in one go as the string concatenate operator creates a new string (strings are immutable by default). While operations such as these are inconsequential due to scale, it is good practice to do the following:
If you're iterating over a more complex structure and need to extract some terms, you can do it as follows:
Cutting down to one line. This also solves the asymmetry of requisites where you may get a result like "MTH1030, ENG1005," with a trailing comma. This can e found in the
unit_embed.py
file, on lines 35, 43, 47, and 50-54.The text was updated successfully, but these errors were encountered: