Skip to main content
0 online
C
chuckthecloneOG 2002

alright well a few things then. i have no idea what a flag is. never heard of it before nor do i know how to use it.

i've been thinking about how i am going to do it by using lists. the only problem is that i have no idea about how to seperate the list to make every letter seperate. for example... if list1 = ['treehouse'] i need to turn it into ['t','r','e','e','h','o','u','s','e',]. is there i just can't have it saved into those two different lists because i'm going to have it random. so like next time the word might not be treehouse.

is this one of those things you are going to make me figure out for myself?

yay yayOG 2004

flag is a boolean status. true false

"is this one of those things you are going to make me figure out for myself?"
well i guess if you're asking that question at this point , i could have posted the answer and you wouldn't even have known it :o)

actually i dont know python, sound's like you're on the right track

deanh77 deanh77Founder

you'll need to figure out how to use Python's string manipulation library to convert a string into an array.

str1 = "treehouse"
is a string,

list1 = ["t","r","e","e","h","o","u","s","e"] is a "list" (called an "array" in most languages, not sure about python)

in Java, list[0] is "t", list[5] is "o" (Note that array indexes start at 0 in most languages)

Python might allow you to treat the string as an array of characters without conversion.
i.e. str1[1] is "r" (I think JavaScript works this way)

deanh77 deanh77Founder

you really need to learn the syntax of the language (how to do loops, conditional blocks/operators, work with arrays), then learn about the standard libraries (i.e. printing out to the screen, manipulating strings, more advanced math functions)

that's really what's most important.

deanh77 deanh77Founder

when I say "most languages" I mean "most languages I've used". heh.

Welcome Back to eZabel

It's been a while. Here's what's new.

eZabel Lore

A complete history of our community — stats, Hall of Fame, legendary threads, and more.

View the Lore →

Everything Preserved

All 225,969 pieces of content from 2000–2014 are here — forums, messages, journals, photos, polls, and events.

💎

Gems

Spot something you love — a legendary comment, a classic thread, a great photo? Log in and click the diamond icon to mark it as a Gem. Add a note about why it's special. The best stuff surfaces on the Gems page.