Questions tagged [python-3.1]

For issues relating to development in Python, version 3.1. Use the more generic [python] and [python-3.x] tags where possible

The Python 3.1 release (first in 2009, since 2012 in security-fix-only mode, end-of-life since 2014) introduced various optimisations and module extensions (collections.OrderedDict)

Use this tag if your question is specifically about . If your question applies to Python in general, use the tag . If your question applies to Python 3.x but not to Python 2, use the tag . If you aren't sure, tag your question and mention which version you're using in the body of your question.

35 questions
-1
votes
1 answer

Custom Module in Window

I was wondering How I can get my code in a window instead of CMD When I run it outside of IDLE. I am using this code with a menu, which uses tkinter. Thanks in Advance. Also If You know how to shorten this code, Please Let me Know. Thanks! def…
ringmikey
  • 3
  • 2
-1
votes
4 answers

Another loop iteration of list

How to write this code correctly? highScore=open('scores.txt',mode='r') score=[] i=0 print("\nName\t\tScore") line=highScore.readline().strip('\n') while line!="": line=str(line).split(', ') x=[line[0],int(line[1])] score.append(x) …
Lbert Hartanto
  • 131
  • 2
  • 2
  • 6
-1
votes
2 answers

Python: getting an error for function, Unindented error

I'm new to Python, and I'm trying to make my string change 'abc' to 'def' and in short I keep getting,"unindented does not match any other indentation level." Therefore, this means what is wrong with my function? def changes(x): if 'a' in sent: …
-2
votes
2 answers

Python - Add time zone to timestamp

I use chrome timestamp and convert it do readable date but time isn't right timestamp_formated = str(datetime.datetime(1601, 1, 1) + datetime.timedelta(microseconds=last_visit_time)) Seems to be timezone need to be added example for last_visit_time…
None
  • 41
  • 7
-2
votes
1 answer

Python - Why is my else statement being ignored in this piece of code?

seats = 3 rating = 12 print('Hello and welcome to Daisy\'s cinema.') while seats > 0: name = input('What is your name?') print('Hello',name,'\n') print('We are currently showing Mockingjay at out cinema.') film = input('What film…
1 2
3