Online Programming Tutorials | Web Tutorials | PHP Tutorials

Python string count() method

The Python string count() returns the number of non-overlapping repetitions of a character or series of characters in the given string. Passing the parameters start and end to the method count(), part of the string is obtained to perform the count. Read More

Python string center() method

The Python string center() method returns a centre-justified new string based on a specified width. It allows the optional parameter to provide the padding characters to the left and right of the string. The space character is the default filler. Read More

Python String isalnum() method

The isalnum() method is used to check that all the characters of a non-empty string are alphanumeric and there is at least one character in the string. This method returns True if the given string only has alphanumeric characters and the length of the string is a minimum of one character. Read More

Python String capitalize() Method

The capitalize() method is used to make the first letter of a string capitalized and the rest characters in lowercase. The method does not change the original string; instead creates a copy of the string with the first character capitalized and the rest of all other characters lowercase. Read More

Python String split() Method

The split() method divides a string into a list of words using the optional delimiter string argument. You often want to split a string into a list to manipulate the content. Read More

Python lambda

The Lambda function can be defined as a function without a name. It is anonymous. It provides an easy and quick way to define small functions in Python. A lambda function can take any number of parameters but only have one expression. The single expression is evaluated and returned and can be used anywhere. Read More

PHP While Loop

The PHP while loop is used to repeat the code inside the while loop a specific number of times. The conditional statement decides the number of iterations of the code. If the condition is TRUE, the while loop continues to execute the code, and if the condition is FALSE, the control move outside of the while loop. Read More

PHP For Loop

Unlike the while loop, the for loop is used when you know beforehand how many times you want to execute the codes. The loop is terminated once the number of iterations surpasses the maximum number specified. Here is how it works. Read More

PHP If else

The core functionality of PHP can evaluate expressions and perform an action based on the results, and If statements are a simple way to do that. If statement is the most basic conditional statement in PHP, it is like the English language sentence "If this happens, do that." It works like this. Read More

PHP Comments

As a programmer, it is good practice to write well-documented code that can be read months later by you or any other developer. It simply makes a developer's life easier who wants to make some changes or a few updates on your code. Read More

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies Find out more here