473,386 Members | 1,864 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,386 software developers and data experts.

split function


Hi All

I am reading data from file using readlines() to list , my question
is how to deal with space between any two numbers , I mean , my data
looks like
1 3
3 4
5 2
6 1

I tried to with my data as it, but i couldn't , so i removed the spaces
13
34
52
61

But when i deal with large number > 9 !!!! , i tried to use split
function , but doesn't work , I can attach my code if its good idea to do ,,

Thanks



Aug 22 '05 #1
1 1326
Mohammed Altaj wrote:
I am reading data from file using readlines() to list , my question
is how to deal with space between any two numbers , I mean , my data
What do you mean by "deal with"? Please describe the input and the
desired output, or what operations you are trying to perform, or
something. "Deal with" could mean anything, so it means nothing.
looks like
1 3
3 4
5 2
6 1

I tried to with my data as it, but i couldn't , so i removed the spaces
13
34
52
61

But when i deal with large number > 9 !!!! , i tried to use split
function , but doesn't work , I can attach my code if its good idea to do ,,


It would probably be a good idea to attach some code, if it's not too
long (no longer than 100 lines or so, preferably less). I'm afraid that
I'm having trouble understanding what you want, and I suspect many other
people are too. I also recommend showing an example, with input and
output, of what you want to achieve: the "before and after" picture. An
example goes a long way towards communicating one's goal.

-Peter
Aug 22 '05 #2

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

Similar topics

2
by: SL_McManus | last post by:
Hi All; I am fairly new to Perl. I have a file with close to 3000 lines that I would like to split out in a certain way. I would like to put the record type starting in column 1 for 2 spaces,...
4
by: Henry Chen | last post by:
Hi, I have a string that needs to be parsed into the string. The separator is not char. It is something like " at ". With current string.Split function, it doesn't work. Is there any exist...
10
by: mb | last post by:
I was wondering if there is an easy, more useful Split function that will split with a string delimiter like "<>" or "////"?
3
by: Ben | last post by:
Hi I am creating a dynamic function to return a two dimensional array from a delimeted string. The delimited string is like: field1...field2...field3... field1...field2...field3......
1
by: John | last post by:
Hi I have written a Split function which in turn calls the standard string split function. Code is below; Function Split1(ByVal Expression As String, Optional ByVal Delimiter As String = " ",...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.