473,320 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Re: string concatenate

sandric ionut wrote:
I have the following situation:
nameAll = []
for i in range(1,10,1):
n = "name" + str([i])
nameAll += n
print nameAll
nameAll = []
for i in range(1,11):
n = "name" + str(i)
nameAll.append(n)
print(' '.join(nameAll)) #3.0

#prints
name1 name2 name3 name4 name5 name6 name7 name8 name9 name10
#as you requested

Oct 1 '08 #1
0 1056

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jonas Galvez | last post by:
Is it true that joining the string elements of a list is faster than concatenating them via the '+' operator? "".join() vs 'a'+'b'+'c' If so, can anyone explain why?
35
by: michael.casey | last post by:
The purpose of this post is to obtain the communities opinion of the usefulness, efficiency, and most importantly the correctness of this small piece of code. I thank everyone in advance for your...
2
by: Alessandro Rossi | last post by:
Hi, I have this problem: In C# i have to concatenate a string "hi Carl" with another string like this """, but C# gives me an error. How can i concatenate a string with the " character? Thank...
3
by: Tom | last post by:
Hi I want to retrieve database data and concatenate them to a string. Here is my code .ToString()); //runtime error her } while (dr.NextResult()) string array =...
5
by: SDL20 | last post by:
How do I incement a numeric portion in Access 2003? The field I want to numerically increment looks like this: Emp-1 Emp-2 .... .... Emp-n
5
by: Generic Usenet Account | last post by:
I have been to recreate a problem that I am having with strings with the trivial code snippet given below. In the trivial code example, I am reading five lines from a data file, each line having...
6
by: Registered User | last post by:
Hi experts, I'm trying to write a program to solve the following exercise: Accept three strings from the user. Find the first occurrence of the first string in the third string. If it is present...
3
by: =?iso-8859-1?B?Qmr2cm4gS2VpbA==?= | last post by:
Hello pythons, I have little problem with understanding conversions in python. I've written a little class - nothing much, just to try out Python a little - containing the following method: ...
7
by: largedimples | last post by:
The assignment was as follows: A character string can be implemented as a linked list of characters. Implement a C++ ADT called Newstring that uses linked lists to implement the following string...
13
by: sinbad | last post by:
hi, how to concatenate a "hash defined" constant value to another "hash defined" constant string. For example #define ABC 100 #define MYSTR "The value of ABC is" Now i need a string that...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.