def play_game(word_list): hand = deal_hand(HAND_SIZE) # random init while True: cmd = raw_input('Enter n to deal a new hand, r to replay the last hand, or e to end game: ') if cmd == 'n': hand = deal_hand(HAND_SIZE) play_hand(hand.copy(), word_list) print elif cmd == 'r': play_hand(hand.copy(), word_list) print elif cmd == 'e': break else: print "Invalid command."
While WHAT is True?
I reckon saying ‘while true’ is shorthand, but for what? While the variable ‘hand’ is being assigned a value? And what if the variable ‘hand’ is not being assigned a value?
Related Posts:
- What is the difference between {} and [] in python?
- syntaxerror: “unexpected character after line continuation character in python” math
- How do you express binary literals in Python?
- Can someone explain __all__ in Python?
- How to exit a loop in Python?
- How can I do a line break (line continuation) in Python?
- What does the /= operator mean in Python?
- What do >> and << mean in Python?
- Is there a difference between `continue` and `pass` in a for loop in python?
- What does `<>` mean in Python?
- What does the “at” (@) symbol do in Python?
- What is :: (double colon) in Python when subscripting sequences?
- What’s the u prefix in a Python string?
- Python def function: How do you specify the end of the function?
- No Multiline Lambda in Python: Why not?
- What does ** (double star/asterisk) and * (star/asterisk) do for parameters?
- Python integer incrementing with ++ [duplicate]
- What is the result of % in Python?
- What’s the meaning of “=>” (an arrow formed from equals & greater than) in JavaScript?
- IndentationError: unexpected indent error
- Putting a simple if-then-else statement on one line [duplicate]
- How can I do a line break (line continuation)?
- How do you comment out code in PowerShell?
- How do I break a string in YAML over multiple lines?
- What does ‘&’ do in a C++ declaration?
- syntaxerror: “unexpected character after line continuation character in python” math
- syntaxerror: “unexpected character after line continuation character in python” math
- `from … import` vs `import .` [duplicate]
- Tab space in Markdown
- syntax error when using command line in python
- In JavaScript is != same as !==
- What does ** (double star/asterisk) and * (star/asterisk) do for parameters?
- syntax error when using command line in python
- What Does This Mean in PHP -> or =>
- Comments in Markdown
- How do I pass multiple parameters into a function in PowerShell?
- Comments in Markdown
- What is the difference between syntax and semantics in programming languages?
- Python: SyntaxError: keyword can’t be an expression
- What do << or >>> in java mean?
- What is the Java ?: operator called and what does it do?
- How do I convert a float number to a whole number in JavaScript?
- hat does “static” mean in C?
- How to normalize a 2-dimensional numpy array in python less verbose?
- Ternary operator (?:) in Bash
- SyntaxError invalid token
- What is the difference between ‘/’ and ‘//’ when used for division?
- Is there a difference between x++ and ++x in java?
- Printing variables in Python 3.4
- What does the “@” symbol do in PowerShell?
- Static Semantics meaning?
- What does the `and` keyword mean in OCaml?
- text highlight in markdown
- Error “‘type’ object has no attribute ‘__getitem__'” when iterating over list[“a”,”b”,”c”]
- Inline for loop
- What does ‘wb’ mean in this code, using Python?
- What does @@variable mean in Ruby?
- Python def marked as invalid syntax
- How do you format an unsigned long long int using printf?
- What are those pipe symbols for in Ruby?
- bash: syntax error near unexpected token `(‘ – Python
- Prolog “or” operator, query
- How can I sandbox Python in pure Python?
- difference between command prompt and anaconda prompt
- Do I understand os.walk right?
- Graphviz’s executables are not found (Python 3.4)
- Converting dictionary to JSON
- Saving and loading objects and using pickle
- How do you split a string in Python with multiple delimiters?
- Error in Python script “Expected 2D array, got 1D array instead:”?
- syntaxError: ‘continue’ not properly in loop
- ValueError: all the input arrays must have same number of dimensions
- Get the data received in a Flask request
- selenium – chromedriver executable needs to be in PATH
- TypeError: tuple indices must be integers, not str
- (unicode error) ‘unicodeescape’ codec can’t decode bytes in position 2-3: truncated \UXXXXXXXX escape
- What do I use for a max-heap implementation in Python?
- TypeError(“‘bool’ object is not iterable”,) when trying to return a Boolean
- Python – How to fix “ValueError: not enough values to unpack (expected 2, got 1)”
- Flask Template Not found
- Running an outside program (executable) in Python?
- What does socket binding mean?
- How to strip all whitespace from string
- Python Binomial Coefficient
- Pandas – How to flatten a hierarchical index in columns
- What is the difference between json.load() and json.loads() functions
- Viewing all defined variables
- Does JavaScript support array/list comprehensions like Python?
- Groupby value counts on the dataframe pandas
- How to plot an array in python?
- If statement for strings in python?
- How to create a numpy array of all True or all False?
- TypeError: expected str, bytes or os.PathLike object, not _io.TextIOWrapper
- Replacing Pandas or Numpy Nan with a None to use with MysqlDB
- Extract first and last row of a dataframe in pandas
- Python decoding Unicode is not supported
- TypeError: got multiple values for argument
- Convert int to ASCII and back in Python
- TypeError: coercing to Unicode: need string or buffer