Skip to content

Tag: python-3.x

Trouble converting Javascript source to Python

I’m trying to convert a Javascript function to Python. Most of it was no problem but there’s one statement I’m not sure how to convert: The Python so far is: idk what +() or /./g are for. The complete JS function is: Answer The /./g is a regular expression and the +() coerces a string into a…