For example:
info= input('Enter name address and telephone number\n')
I have tried declaring variables in advance ie.
var1 = " " var2 = " " var3 = " " but to no avail. Can you please help ?
Thanks in anticipation.
If you are using Python 2.x, use raw_input(). To accomplish your task, the entered data must be formatted for parsing. Delimiting the data with commas will do nicely. Example, entering "Bill,101 Main St.,(888) 000-000": - >>> n,a,t = raw_input("Enter Name, Address, Telephone #").split(',')
-
>>> n
-
'Bill'
-
>>> a
-
'101 Main St.'
-
>>> t
-
'(888) 000-000'
-
>>>
3 2816 bvdet 2,851
Expert Mod 2GB
If you are using Python 2.x, use raw_input(). To accomplish your task, the entered data must be formatted for parsing. Delimiting the data with commas will do nicely. Example, entering "Bill,101 Main St.,(888) 000-000": - >>> n,a,t = raw_input("Enter Name, Address, Telephone #").split(',')
-
>>> n
-
'Bill'
-
>>> a
-
'101 Main St.'
-
>>> t
-
'(888) 000-000'
-
>>>
Many thanks for such a rapid solution ; the online articles
make no reference ,to the best of my knowledge, to multiple variables for input / raw_input.
EasyGUI is a simple solution if you are entering parameters from the command line. If you are calling the program from another program and supplying parameters, then it obviously won't work. http://easygui.sourceforge.net/ Sign in to post your reply or Sign up for a free account.
Similar topics
by: noah |
last post by:
Does PHP have a feature to associate Cookie sessions with a persistent
database connection that will allow a single transaction across
multiple HTTP requests?
Here is how I imagine my process: I...
|
by: Johnny Lin |
last post by:
Hi!
Is there a way to automate the unbinding of multiple variables? Say I
have a list of the names of all variables in the current scope via
dir(). Is there a command using del or something...
|
by: agent349 |
last post by:
Hi,
I'm fairly new to c++. I need user input in the form of dollar
amounts, ie: "$10.00". I'd like to remove the dollar sign "$" then
store the rest in a variable. How do I go about removing the...
|
by: Ani |
last post by:
Hi,
I need to carry the user input across pages and then at
the end insert all the values into the DB. How do I best
accomplish this task in ASP.Net. I am a novice , please
give me some simple...
|
by: Paulers |
last post by:
hello VB masters I have an issue that I am hoping you can help me with.
I am creating an application that accepts user input via a richtextbox.
the user can enter multiple entries and I need to...
|
by: syntego |
last post by:
I am using DB2 V8 fixpack 10 and have the following issue:
>From a User Defined Function, I can assign multiple variables in a
single statement as follows:
-- Get the first update transaction...
|
by: Matt |
last post by:
Hi,
I'm ridiculously new to Access (about a week!) so please be patient!
My database is a record of British Standards. Each has a unique
identifier. Some are split into parts. I would like...
|
by: waffle.horn |
last post by:
Hi,
if this makes sense i want to create a function that can be called so
that it reads a single line from a file, then after using the
information destroys it. Such that when the function is...
|
by: vaiism |
last post by:
I am creating a report that outputs the contact information and details about a water treatment plant, and needs to include information about people who work there.
If I tie all the information...
|
by: Tarique |
last post by:
Hello All.
Is the following good enough to be a safe user input routine?
What else should i do to improve it ?
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define ARRAYSIZE 100
...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |