What do you want to save?
Add Code snippet
New code examples
-
Rust 2021-10-16 12:25:03
read file rust
document = 'document.txt' file = open(document, 'r') # 'r' can be replaced with: # 'w' to write # 'a' to append (add to the end) # 'w+' makes a new file if one does not already exist of that name # 'a+' is the same as 'w+' but it appends if the file does ... Add solution -
-
Javascript 2021-10-12 00:46:12
Qwiklabs Assessment: Working with Regular Expressions
#!/usr/bin/env python3 import re import csv def contains_domain(address, domain): """Returns True if the email address contains the given,domain,in the domain position, false if not.""" domain = r'[\w\.-]+@'+domain+'$' ... Add solution -
Python 2021-10-08 15:11:12
telegram chat bot using flask
import re from flask import Flask, request import telegram from telebot.credentials import bot_token, bot_user_name,URL global bot global TOKEN TOKEN = bot_token bot = telegram.Bot(token=TOKEN) app = Flask(__name__) @app.route('/{}'.format(TOKEN), met... Add solution -
Python 2021-10-08 04:39:04
short name in python
Raw_name = input("\nEnter Full Name : ") name = Raw_name.strip() bname = name.split(' ') lenofstr = len(bname) fname = bname[0] leofstrstr = str(lenofstr) vlname = int(lenofstr) - 1 lname = bname[int(vlname)] print("\nHi,"+bname[0]) ... Add solution -
Python 2021-10-02 05:28:02
append and delete hackerrank solution in python
if __name__ == '__main__': s = input().strip() t = input().strip() k = int(input().strip()) min_len = min(len(s), len(t)) first_different_index = min_len for i in range(min_len): if s[i] != t[i]: first_differen... Add solution