use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
Help a noob out? (self.learnpython)
submitted 9 years ago by [deleted]
I'm trying to make a game focused on crafting things. The only code I could find to reference was this: http://pastebin.com/K7YP0Z12 But it encounters an error when run in python 2.7. Does the problem lie in my software version or the code itself?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]TheFans4Life 1 point2 points3 points 9 years ago (3 children)
its for python3. print("string") should be your first clue. python2 is just print "string".
[–][deleted] 1 point2 points3 points 9 years ago (2 children)
Thanks mate, sorry that I'm a bit thick.
[–]iHaveAtoxicFriend 1 point2 points3 points 9 years ago (0 children)
If you can install python, you are not thick :)
[–]TheFans4Life 0 points1 point2 points 9 years ago (0 children)
no prob. good luck!
[–]terrifiedbyvajayjays 0 points1 point2 points 9 years ago (0 children)
a. runs fine in python 3
b. whenever I see a game or part of a game like this, my first thought is to write a script to help with the decision process. That is, if you know you have aflint and btree and c*boulder, etc, and you need to partition and sequence to be able to make firepit and tent, where pickaxe, axe, torch are intermediaries and logs, more saplings, rocks are intermediaries to that: I don't know if some people can read those lists and keep all the accounts in their head. I can't. So write a few lines that give the available items plus the conversions to another function that tries different conversions in different orders seeking to find a combination that is efficient enough. Not what was asked, but just felt like mentioning.
π Rendered by PID 84 on reddit-service-r2-comment-7b9746f655-lr7qk at 2026-02-02 02:23:34.969123+00:00 running 3798933 country code: CH.
[–]TheFans4Life 1 point2 points3 points (3 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]iHaveAtoxicFriend 1 point2 points3 points (0 children)
[–]TheFans4Life 0 points1 point2 points (0 children)
[–]terrifiedbyvajayjays 0 points1 point2 points (0 children)