remove part of string python
txt = 'abbacabbd'
print(url.replace('bbd',''))
#output:
abbaca
remove part of string python
txt = 'abbacabbd'
print(url.replace('bbd',''))
#output:
abbaca
delete parts of a string c++
#include<iostream>
#include<string>
using namespace std;
int main()
{
string text = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << "Initial string: " << text << endl;
text.erase(10, string::npos);
// string.erase(pos1, pos2) removes the part of the string between position 1 and 2.
// In this case, between character 10 and the end of the string.
cout << "Final string: " << text;
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us