Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Basics (Retired) Shopping List Lists

Stéphane Diez
Stéphane Diez
19,350 Points

Python Console Problem!

I can't use the [ ] in the Python console in workspace.

Why?

11 Answers

Stéphane Diez
Stéphane Diez
19,350 Points

no I can't use the keys [ and ] at my keyboard. But only in the workspace of treehouse

Vittorio Somaschini
Vittorio Somaschini
33,371 Points

Any solution to this?

I am having the same problem (it is only in the console, not on the .py files that I create).

Actually I have never used the console section of workspaces so far basically

Jim Hoskins
Jim Hoskins
Treehouse Guest Teacher

Hi Vittorio, could you please let us know the language setting for your computer, and the keyboard language and layout you have? These problems tend to be really complicated, and usually caused by language encoding issues, this info would give us a better chance of reproducing the problem and finding a solution.

Roger Nordqvist
Roger Nordqvist
7,007 Points

Swedish keyboard layout here ... when typing '[' with Alt+8 it replicates Backspace keypress.

Boban Alempijevic
Boban Alempijevic
317 Points

I have the same problem and I also use Swedish Keyboard layout.

I have this problem too...with a French keyboard layout

Wolf <null>
Wolf <null>
5,060 Points

Swedish keyboard layout here as well.

Can't use [ ] in the console window with python but the workspace window it works fine.

David Bouchare
David Bouchare
9,224 Points

Hi there,

You mean you cannot create lists at all?

I've just created a test method:

def test():
    list1 = []

print(test())

And that works fine. Any snippets of code maybe and error you're getting (if any)?

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

Can you give us some details on your browser, OS, etc? Pinging Jim Hoskins

Stéphane Diez
Stéphane Diez
19,350 Points

Browser Google Chrome, Windows 8.1 On my Mac OS X 10.9.5 it doesn't work too.

Jim Hoskins

Jim Hoskins
Jim Hoskins
Treehouse Guest Teacher

That's unusual, we can't replicate that given these conditions.

It might be possible your keyboard or language settings could be a contributing factor. Do you know what the keyboard language and layout are on your computer(s)?

Stéphane Diez
Stéphane Diez
19,350 Points

On my keyboard I'm using Switzerland, German. The language of my computer is german. But it's not a big point for me. I'm having this problem only on the python courses

Kenneth Love
Kenneth Love
Treehouse Guest Teacher

So you can type [ and ] in Workspaces for other courses?

Vittorio Somaschini
Vittorio Somaschini
33,371 Points

Hello Jim.

There you go:

language: Italian *if I swap keyboard to US English [ and ] work (there is no need to do the combo anymore in that case)

layout: Italian

good luck ;)

Vittorio Somaschini
Vittorio Somaschini
33,371 Points

Hey Jim Hoskins .

Just for completing the info.

It looks like I can't indent too on the python console.

Not sure if it is related but I had to use spaces

Just to make you aware.

cheers