re not working

2019-09-16 Thread CrazyVideoGamez
For some reason these are different: pattern = r'[0-9]{4,6}' And pattern2 = r'[0-9][0-9][0-9][0-9]([0-9]){0,2}' And when I try to match them import re re.search(pattern, '1234') and import re re.search(pattern2, '1234') are different. Help? -- https://mail.python.org/mailman/listinfo/pytho

Weird Python Bug

2019-09-13 Thread CrazyVideoGamez
For some reason, if you put in the code def odd_ones_out(numbers): for num in numbers: count = numbers.count(num) if not count % 2 == 0: for i in range(count): numbers.remove(num) return numbers nums = [72, 4, 82, 67, 67] print(odd_ones_out(nums

Pygal bar colors

2019-08-31 Thread CrazyVideoGamez
How do you change the color of the bar in pygal? I want to change it from red to blue. Help! -- https://mail.python.org/mailman/listinfo/python-list

Python Editor for mobile

2019-08-30 Thread CrazyVideoGamez
Are there any good editors on Apple that don't cost money and already has matplotlib, numpy, and other modules already installed? -- https://mail.python.org/mailman/listinfo/python-list

How Do You Replace Variables With Their Values?

2019-07-10 Thread CrazyVideoGamez
How do you replace a variable with its value in python 3.7.2? For example, say I have: dinner = {'Starters':['Fried Calamari', 'Potted crab'],'Main Course':['Fish', 'Meat'], 'Desert':['Cake', 'Banana Split']} # Don't ask where I got the dinner from for meal in dinner.keys(): meal = l

How Do You Replace Variables With Their Values?

2019-07-10 Thread CrazyVideoGamez
How do you replace a variable with its value in python 3.7.2? For example, say I have: dinner = {'Starters':['Fried Calamari', 'Potted crab'],'Main Course':['Fish', 'Meat'], 'Desert':['Cake', 'Banana Split']} # Don't ask where I got the dinner from for meal in dinner.keys(): meal = lis

Re: Make sure the window title is visible in tkinter

2019-06-28 Thread CrazyVideoGamez
On Wednesday, June 26, 2019, at 7:44:15 AM UTC-4, Cecil Westerhof wrote: > I need to write a desktop program. I choose to use tkinter. How can I > make sure the window title is visible? For example when I have the > following code: > from tkinter import Button, filedialog, Label, messagebo

How do you insert an item into a dictionary (in python 3.7.2)?

2019-06-28 Thread CrazyVideoGamez
How do you insert an item into a dictionary? For example, I make a dictionary called "dictionary". dictionary = {1: 'value1', 2: 'value3'} What if I wanted to add a value2 in the middle of value1 and value3? -- https://mail.python.org/mailman/listinfo/python-list

What does at 0x0402C7B0> mean?

2019-05-21 Thread CrazyVideoGamez
I tried doing a list comprehension. I typed: favorite_fruits = ['watermelon', 'blackberries'] print(fruit for fruit in favorite_fruits) And I got: at 0x0402C7B0> What does this mean and what do I have to fix? -- https://mail.python.org/mailman/listinfo/python-list

What is a, b, c, and d in: rect1 = drawing.create_rectangle(a, b, c, d) and circle1 = drawing.create_oval(a, b, c, d)

2019-04-09 Thread CrazyVideoGamez
What is a, b, c, and d in: from tkinter import * window = Tk() drawing = Canvas(window, height=500, width=500) rectangle = drawing.create_rectangle(a, b, c, d) and: circle = drawing.create_oval(a, b, c, d) ??? -- https://mail.python.org/mailman/listinfo/python-list

Re: Might be doing this wrong? (Turtle graphics)

2019-03-25 Thread CrazyVideoGamez
On Wednesday, March 20, 2019, at 7:34:53 PM UTC-4, CrazyVideoGamez wrote: > So, I typed in code: > from turtle import * > forward(100) > right(120) > clear() > It didn't work! It kept on saying that there was an indent and the first line > was wrong. Help! wait no

Re: Might be doing this wrong? (Turtle graphics)

2019-03-25 Thread CrazyVideoGamez
On Wednesday, March 20, 2019 at 8:29:42 PM UTC-4, MRAB wrote: > On 2019-03-21 00:12, DL Neil wrote: > > Jason, > > > > On 21/03/19 12:34 PM, jasonanyil...@gmail.com wrote: > >> So, I typed in code: > >> from turtle import * > >> forward(100) > >> right(120) > >> clear() > >> It didn't work! It kep

Re: Python 3.7 Bug

2019-03-25 Thread CrazyVideoGamez
On Monday, March 25, 2019 at 2:07:11 PM UTC-4, Bassam Abdul-Baki wrote: > Greetings, > > In the following code, there's a bug on certain parameters. > > -- > > def per(n, steps = 0): > digits = [int(i) for i in str(n)] > result = 1 > for j in digits: > result *= j > steps += 1 > p

Re: What does "TypeError: unsupported operand type(s) for +: 'function' and 'int'" mean?

2019-03-25 Thread CrazyVideoGamez
On Monday, March 25, 2019, at 3:31:09 PM UTC-4, CrazyVideoGamez wrote: > I have no idea what "TypeError: unsupported operand type(s) for +: 'function' > and 'int'" means and I don't know how to fix it. Help! -- https://mail.python.org/mailman/listinfo/python-list

What does "TypeError: unsupported operand type(s) for +: 'function' and 'int'" mean?

2019-03-25 Thread CrazyVideoGamez
I have no idea what "TypeError: unsupported operand type(s) for +: 'function' and 'int'" means and I don't know how to fix it. Help! -- https://mail.python.org/mailman/listinfo/python-list

Re: Might be doing this wrong? (Turtle graphics)

2019-03-20 Thread CrazyVideoGamez
On Wednesday, March 20, 2019, at 7:34:53 PM UTC-4, CrazyVideoGamez wrote: > So, I typed in code: > from turtle import * > forward(100) > right(120) > clear() > It didn't work! It kept on saying that there was an indent and the first line > was wrong. Help! I'm a