help (im a begginer)

This is the place for queries that don't fit in any of the other categories.

help (im a begginer)

Postby minime » Thu Jan 30, 2014 5:09 pm

i just need really simple help

usernames = {"tom", "james"}
input + usernames

i need a way to make a new username and add it to the string but i dont know how im guessing you do input + usernames
and if i put in bob it will add to it and be {"tom", "james", "bob"}

and use dict to login

thank you
Last edited by Yoriz on Thu Jan 30, 2014 5:47 pm, edited 2 times in total.
Reason: First post lock
minime
 
Posts: 3
Joined: Thu Jan 30, 2014 5:04 pm

Re: help (im a begginer)

Postby Yoriz » Thu Jan 30, 2014 5:46 pm

Hi welcome to the forum.
Please read the 'new users, read this' link in my signature

Code: Select all
usernames = {"tom", "james"}
users_input = "bob"
usernames.add(users_input)
print usernames

Output
Code: Select all
set(['james', 'bob', 'tom'])


Your question is a bit confusing because
minime wrote:i need a way to make a new username and add it to the string
Its not a string its a set

minime wrote:and use dict to login
Did you mean to make a dict, not a set?
New Users, Read This
Join the #python-forum IRC channel on irc.freenode.net!
Spam topic disapproval technician
Windows7, Python 2.7.4., WxPython 2.9.5.0., some Python 3.3
User avatar
Yoriz
 
Posts: 833
Joined: Fri Feb 08, 2013 1:35 am
Location: UK

Re: help (im a begginer)

Postby minime » Thu Jan 30, 2014 5:56 pm

sorry i need a way to make simple accounts, and a way to login to them
minime
 
Posts: 3
Joined: Thu Jan 30, 2014 5:04 pm

Re: help (im a begginer)

Postby Yoriz » Thu Jan 30, 2014 6:04 pm

minime wrote:sorry i need a way to make simple accounts, and a way to login to them

Sorry but i dont know what you mean.
New Users, Read This
Join the #python-forum IRC channel on irc.freenode.net!
Spam topic disapproval technician
Windows7, Python 2.7.4., WxPython 2.9.5.0., some Python 3.3
User avatar
Yoriz
 
Posts: 833
Joined: Fri Feb 08, 2013 1:35 am
Location: UK

Re: help (im a begginer)

Postby minime » Thu Jan 30, 2014 6:18 pm

an account like for an email with a username and password
minime
 
Posts: 3
Joined: Thu Jan 30, 2014 5:04 pm

Re: help (im a begginer)

Postby Marbelous » Thu Jan 30, 2014 10:55 pm

Your wording is confusing. Are you trying to simulate a login process where you have to sign in with a password and also have the ability to modify the usernames and passwords (stored in a dictionary) the way an account administrator would?
Marbelous
 
Posts: 142
Joined: Fri May 31, 2013 8:12 pm

Re: help (im a begginer)

Postby Kebap » Thu Jan 30, 2014 11:42 pm

minime wrote:sorry i need a way to make simple accounts, and a way to login to them

Do you mean you want to pay somebody to program this for you? Or you want to learn? Did you already try something? Please show more detail. Thanks! :mrgreen:
Learn: How To Ask Questions The Smart Way
Join the #python-forum IRC channel on irc.freenode.net and chat with uns directly!
Kebap
 
Posts: 396
Joined: Thu Apr 04, 2013 1:17 pm
Location: Germany, Europe


Return to General Coding Help

Who is online

Users browsing this forum: Google [Bot] and 4 guests

cron