Hi, I'm new to python so I'm asking a noob question.
I'm given a large string from which I have to take all the digits and check if its prime or not. Then I have to take the first 25 chars of the string and append the prime digits to it. How am I supposed to do it ?
np complete
8
Newbie Poster
Recommended Answers
Jump to PostCan you give a generic example of such a string and the expected result ?
Jump to PostWhy did you declare i = "" ? Python cannot add a str to an int.
All 8 Replies
Gribouillis
1,391
Programming Explorer
Team Colleague
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
james.lu.75491856
0
Junior Poster
np complete
8
Newbie Poster
np complete
8
Newbie Poster
Gribouillis
1,391
Programming Explorer
Team Colleague
np complete
8
Newbie Poster
Gribouillis
1,391
Programming Explorer
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.