+ indep. WoS citations

Python and Networks // Additional Notes 2017-02-14

1.  How can I set the seed of the random number generator?

With random.seed(). See, for example, "random.seed(): What does it do?"

2.  Why can I overwrite "int", but not "for"?

Python uses keywords and literals: "for" is a keyword, "int" is not.

3.  How can I remove the character at position n from a string?

In python you cannot directly remove a character from a string by specifying its position in the string. Strings are immutable in python. However, you can create a new string that contains everything from the original string except its character at position n:

s[:n] + s[(n+1):]

4.  How do you pronounce the word "tuple"?

There is more than one way to do it :) as an example, see this discussion.