I'm fourteen and living in New Paltz, NY. Python is a hobby outside of school.
-
-
Webmaster4o
x.split()
will give you each word as an element in a list. So, to get the second word of your sentence, you usex.split()[1]
.You could do something like:
words = x.split() if words[0].lower() == "jump": second_word = x.split()[1]
-
Webmaster4o
There may be an API incompatibility with iOS 10, I'm sure @omz will fix it soon enough
-
Webmaster4o
The Pythonista turtle module is rewritten completely from the desktop module, so I don't know if there's complete feature parity, but in the desktop module I think you can use
turtle.speed(0)
. Give it a try and let me know. -
Webmaster4o
When we were discussing a cleaner
objc_util
syntax a few months ago, the suggestion of using kwargs was rejected because there as no way to guarantee the order. However, look at this from the Python 3.6 release notes!**kwargs
in a function signature is now guaranteed to be an insertion-order-preserving mapping.This is from PEP 468
Unless I'm mistaken, this would enable that syntax.
-
Webmaster4o
@mikael I'm actually currently working on the same thing for https://zeit.co/now
-
Webmaster4o
@Phuket2 A github repo just for your experiments would be a good way to organize them, I think
-
Webmaster4o
One tip for making text more readable is something the Material Design guidelines recommend: While white text should be
rgba(255, 255, 255, 1)
, but black text should bergba(0, 0, 0, 0.87)
. The slight opacity in the black makes it much more readable on colored backgrounds. -
Webmaster4o
@SpiesWithin This example is correct.
client
is defined withclient = discord.Client()
-
Webmaster4o
@ccc It does, but it can't possibly convert them back into tuples.
In [2]: a = livejson.File("/Users/luke/Desktop/a.json") In [3]: a["b"] = (0, 1, 2, 3) In [4]: a["b"] Out[5]: [0, 1, 2, 3]