How to create a Domain Name Validator in Python
The challenge
Create a domain name validator mostly compliant with RFC 1035, RFC 1123, and RFC 2181
The following rules apply:
- Domain name may …
320 articles about python development, tools, and best practices
Create a domain name validator mostly compliant with RFC 1035, RFC 1123, and RFC 2181
The following rules apply:
Your task is to write a regular expression (regex) that will match a string only if it contains at least one valid date, in the format …
Read Article →You need to write regex that will validate a password to make sure it meets the following criteria:
The goal of this challenge is to write a function that takes two inputs: a string and a character. The function will count the number of …
Read Article →Write a nickname generator function, nicknameGenerator that takes a string name as an argument and returns the first 3 or 4 letters as a …
This function should test if the factor is a factor of base.
Return true if it is a factor or false if it is not.
Factors are numbers …
!--> Read Article →Write a function that checks if a given string (case insensitive) is a palindrome.
Option 1:
def …
Read Article →
You are given two arrays a1 and a2 of strings. Each string is composed of letters from a to z. Let x be any string in the first array …
You are be given a string that has lowercase letters and numbers. Your task is to compare the number groupings and return the largest …
Read Article →Finish the solution so that it sorts the passed-in array/list of numbers. If the function passes in an empty array/list or null/None …
Read Article →Count the number of occurrences of each character and return it as a list of tuples in order of appearance. For empty output return an …
Read Article →Given a sequence of numbers, find the largest pair sum in the sequence.
For example
[10, 14, 2, 23, 19] --> 42 (= 23 + 19)
[99, 2, …
Read Article →