Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 235364

Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability. Use the python tag for all Python related questions. If you believe your question may be even more specific, you can include a version specific tag such as python-3.x.

3 votes

Is there any way to condense my code so it does not take up so many lines?

When refactoring code that is not DRY then try to identify the parts that actually do change and put those parts into some kind of data structure like a list or dictionary. Then wrap everything into a …
Willi Flemming's user avatar
1 vote

Shop system for an RPG in Python

This answer is meant to be for beginners from a beginner. I try to incorporate best practices as explained by Lev M. while not changing the original structure of the code too much. I guess the most im …
Willi Flemming's user avatar
2 votes

Automate the Boring Stuff Chapter 8 Sandwich Maker

Unecessary else-statements In if cheeseResponse == 'yes': cheeseChoice = pyip.inputMenu(['cheddar', 'swiss', 'mozzarella'], 'Please choose your cheese:\n', lettered=True) customerOrder.append( …
Willi Flemming's user avatar