473,698 Members | 2,932 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

unordered set in python...questi on about how the items within it are displayed

1 New Member
since sets in python are unordered collection,a set does't show the items it contains in the same order they have added. is it however safe to assume that the items will be displayed always in the same order?? eg.
i create the following set
test = set['regina', 'paul', 12, 'cool' ]

if i want to show the items in test
test
i may get the following output: set(['cool', 12, 'paul', 'regina'])
does it mean the items will be showed from now on in that same order?
thanks folks
Jun 27 '12 #1
1 2140
bvdet
2,851 Recognized Expert Moderator Specialist
Probably in the short term, but there is no guarantee the order will be the same in other versions of Python.
Jun 28 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
48761
by: Tubby Tudor | last post by:
What is the best way to call one python script from within another python script? For example: one.py finishes succesfully and calls two.py which finishes OK and then calls three.py Thanks guys!
6
1531
by: SnuSnu | last post by:
Okay - here's a (probably) really easy question: I can't do the following, so what's the best way to handle this case of wanting to delete within a loop? x = deletion_list = for i in deletion_list: del x
32
2523
by: David | last post by:
Hi I'm trying to teach myself python and so far to good, but I'm having a bit of trouble getting a function to work the way I think it should work. Right now I'm taking a simple program I wrote in Fortran and trying to do it in Python. I got it to work, but now I'm trying to modularize it. My fortran program uses a subroutine and I was trying to do the same thing in Python. But I'm still new so I'm having trouble understanding what I'm...
2
345
by: Harry | last post by:
Hi All, It is nice to join the python group. Can someone please help me with a python question? I have the following object which is like a list of tuples What command do I use to get the value corresponding to 'min'? This object seems to be non-indexable row=
2
2266
by: bandroo | last post by:
Hi Guys How can I modify the items within a hashtable "in situ" so to speak? At the moment, I am locating the item that I want, extracting it, modifying the item, deleting the hashtable item, and then adding back the modified item to hashtable. This seems rather long winded, and surely there must be a simpler way than that.
1
1276
by: Scheol Service | last post by:
---------- Forwarded message ---------- From: Scheol Service <scheols@gmail.com> Date: Nov 29, 2006 10:57 PM Subject: Python Question About Compiling. To: mailto:python-list@python.org Im just unsure on how to compile python code into .exe executionable files. Is there a simple way to do this?
3
2277
by: Kaz Kylheku | last post by:
I have a structure of three boxes contained within a box, like this: <div class="line"> <div class="box" id="one">one</div> <div class="box" id="two">two</div> <div class=box" id="three">three</div> </div> In the style sheet, I lay these out horizontally blocks within a line box, say like this:
2
2176
by: =?iso-8859-1?q?Jo=E3o_Correia?= | last post by:
class CScore { public: int L; int C; CScore(int l, int c) { L = l; C = c;
2
5545
by: HockeyFan | last post by:
Yesterday, I posted a question dealing with an issue of trying to reference (from javascript on the client side) an item within a Repeater. My code was hard-coded to use the actual ClientId, but someone admonished me, stating that I shouldn't do that because the id could change. However, since I'm trying to reference a control on a Repeater line, I'm wondering how else to do that. Repeaters aren't rendered in html are they? What method...
14
2653
by: jmDesktop | last post by:
Hi, I'm trying to learn Python. I using Aquamac an emac implementation with mac os x. I have a program. If I go to the command prompt and type pythong myprog.py, it works. Can the program be run from within the editor or is that not how development is done? I ask because I was using Visual Studio with C# and, if you're familiar, you just hit run and it works. On Python do I use the editor for editing only and then run the program from...
0
8611
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9031
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8904
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8876
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7741
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6531
isladogs
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5867
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4372
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.