Introduction A list is the most flexible data structure in Python. This method is quite simple and straight. Im obrigen Beispiel sind die Werte Ganze Zahlen (d.h. ohne Nachkommastelle), somit verwenden wir die Funktion „int(<>)“ print( int(a) + int(b)) Nun erhalten wir unser gewünschtes Ergebnis von 5. So far we had already used some lists, and here comes a proper introduction. In such a list we want to convert the string elements into actual integers. What's the difference between 'war' and 'wars'? Lists are related to arrays of programming languages like C, C++ or Java, but Python lists are by far more flexible and powerful than "classical" arrays. Whereas, a 2D list which is commonly known as a list of lists, is a list object where every item is a list itself - for example: [[1,2,3], [4,5,6], [7,8,9]]. Sometimes we can have a list containing strings but the strings themselves are numbers and closing quotes. This chapter is also available in our English Python tutorial: List Manipulations Sitenin Türkçe çevirisi / Türkische Übersetzung Klicke hier, um dieses Thema auf Türkisch anzuzeigen / Bu konuyu Türkçe görüntülemek için tıklayın: Listeler Python3 Dies ist ein Tutorial in Python 3. The function needs the list and the item we are looking for and returns a boolean value as to whether it is present. Furthermore, we can see that we raise an error, if we try to assign a new value to an element of a tuple: In many programming languages it can be quite tough to slice a part of a string and even harder, if you like to address a "subarray". Python String join() method returns a string by joining all the items of an iterable, separated by a string separator if provided. Python can generate such random numbers by using the random module. Sequential search of a list of integers. For example, not all the items in a list need to have the same type. Most probably the easiest way for C programmers will be through indices, i.e. There is a "" operator available as well. Python list to string. That was a surprise to me that people were prepared to painstakingly write HTML." I even need the comma (',') included, but this is not the main problem. python. So the normal way you might go about doing this task in python is using a basic for loop: Among all sequence types, Lists are the most versatile. The sequence: every number from 1..100, divisible by 4 with remainder 1 or 2. Further Information! If the third argument is for example 3, only every third element of the list, string or tuple from the range of the first two arguments will be taken. Python Server Side Programming Programming. It's easy to check, if an item is contained in a sequence. The augmented assignment for "" can be used as well: These sublists may contain sublists as well, i.e. Slicing is often implemented in other languages as functions with possible names like "substring", "gstr" or "substr". So far we had already used some lists, and here comes a proper introduction. Augment assignments may be applied for mutable objects as an optimization. How to iterate over rows in a DataFrame in Pandas. Further description of the final function would be greatly appreciated. A016105: Blum integers {21, 33, 57, 69, 77, 93, 129, 133, 141, 161, 177, ...} Numbers of the form pq where p and q are distinct primes congruent to 3 (mod 4). The int function can be applied to the string elements of a list converting them to integers . Write a function that takes a number as an argument and prints the Fibonacci series till that number, In python 3.1 you can produce a list in a way. 22, Jul 19. Actually it looks a little bit like accessing a single element with an index, but instead of just one number, we have more, separated with a colon ":". How can a Z80 assembly program find out the address stored in the SP register? By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy. The sorted function will rearrange the elements of the list in a sorted order. Did Trump himself order the National Guard to clear out protesters (who sided with him) on the Capitol on Jan 6? For example, not all the items in a list need to have the same type. You might have noticed that methods like insert, remove or sort that only modify the list have no return value printed – they return the default None. Fetch a cart and start shopping: A tuple is an immutable list, i.e. s = n is the same as s = s * n. In our previous examples we applied the repetition operator on strings and flat lists. Figure 1 shows how this search works. To convert the list to string in Python, use the join() function. Stack Overflow for Teams is a private, secure spot for you and Python NumPy to iterate through List in Python. For example, the length of a string, a list, and a tuple can be determined with a function called len(): The byte object is a sequence of small integers. If the data is sorted on a field, the generated numbers will not be sequential. It constructs a start_bound list and an end_bound list, which contains the position of starting and ending sequence of increasing integers.Thus simply return the bounds using for loops. Syntax. Set the Parser to Python. with the counters and returned object will be an enumerate. When you need to add counters to an iterable, enumerate is usually the most elegant approach. site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. How can I force division to be floating point? If the desired result is for a list like {1,1} we should give true, then the code with Last, First and Length is useless. Python Lists. Initially I though something of this 'odd = []' 'even = []' 'for c in range(0,100):' 'if c%2==0:' 'odd.append(c)' 'for c in range(0,100):' 'if c%2==1:' 'even.append(c)' 'for c in range(0, 50):' 'if c % 2 == 0:' 'print(even[c],end=",")' 'else:' 'print(odd[c],end=",")' Yeah, I'm a newcomer. Python: Tips of the Day. Since these index values are ordered, it is possible for us to visit them in sequence. At each stage an alternating sequence of 1s and 0s is inserted between the terms of the previous sequence. That we are concerned with integers is explicitly specified by the OP. Bodenseo; The rules for indices are the same as for lists. Combining two sequences like strings or lists is as easy as adding two numbers together. Lists are mutable which means they can be changed. 5. 10, Sep 18. You should just iterate over the list items. For example, not all the items in a list need to have the same type. 02, Jan 20. Here, we are going to learn how to convert comma separated elements into list using Python?Here, we will input comma separate elements and convert into a list of integers. Generating random number list in Python. list.count(value) Parameter Values. Lists are related to arrays of programming languages like C, C++ or Java, but Python lists are by far more flexible and powerful than "classical" arrays. In Python lists, these relative positions are the index values of the individual items. y[0][0] and we have "automatically" changed the first elements of all the sublists in y, i.e. The list is filled only with integers and I can assume that there are at least 2 integers in the list. A typical list starts from 0 indices. 07, Jan 18. the number of objects, "Accessing the last element of the list: ", # "pop()"" removes the last element of the list and returns it, "assignments to elements are not possible", ---------------------------------------------------------------------------, "TPoyrtohnotno ciosu rtshees lianr gTeosrto nCtiot yb yi nB oCdaennasdeao", Starting with Python: The Interactive Shell, Formatted output with string modulo and the format method. What happens to a Chain lighting with invalid primary target and valid secondary targets? We have to carefully design the for loops to go through each element and get the result even if there are multiple strings inside a single element. So every time you want to extract part of a string or a list in Python, you should use the slice operator. This process gives rise to our first searching technique, the sequential search. 85 1 1 gold badge 1 1 silver badge 7 7 bronze badges. Converting all strings in list to integers in Python. Method #3 : Using set The use of Python set is an efficient and tricky way to find the missing numbers in the list. Why are you iterating over a separate range object? Important thing about a list is that items in a list need not be of the same type. Should the stipend be paid if working remotely? Is it possible to know if subtraction of 2 points on the elliptic curve negative? Join Stack Overflow to learn, share knowledge, and build your career. What is the point of reading classics over modern treatments? To create a list of integers between 0 and N, a solution is to use the … 01, Apr 19 . The above Python program is to find the index of an element in a list in Python. List objects are enclosed by square brackets and separated by commas. I feel like its just a simple question of asking if the list contains either of the other lists or something. But as we saw before, lists can have various data types, as shown in the following example: Lists can have sublists as elements. For example − Similar to string indices, list indices start at 0, and lists can be sliced, concatenated and so on. w3resource. How can I quickly grab items from a chest to my inventory? Figure 1: Sequential Search of a List of Integers ¶ The Python implementation for this algorithm is shown in CodeLens 1 . Its elements can be updated, removed, and also elements can be inserted into it. Furthermore, there seems to be a mix up between what is the desired result and what we can assume about the input list. © 2011 - 2020, Bernd Klein, The problem does not state whether the largest and second largest integers must be unique integers. Thanks guys! I may want to increase or decrease the size of the array. … The function needs the list and the item we are looking for and returns a boolean value as to whether it is present. We will return to our previous example with European city names: Now we extract all cities except the last two, i.e. edit close. Does Python have a ternary conditional operator? It can be an arbitrary mixture of elements like numbers, strings, other lists and so on. ", # the length of the list, i.e. lst=range(100) for i in range(100) print lst[i]+',' share | improve this answer | follow | answered Jun 16 '12 at 16:08. indiag indiag. In python list is a builtin class, so its usage as a variable is somewhat discouraged – Snakes and Coffee Aug 16 '13 at 5:33 x*increment, but what do you mean by … Generally speaking a list is a collection of objects. [python] seq = np.random.randint(1, 7, size = 100) [python] The size is set to 100 arbitrarily. In the below examples we will first see how to generate a single random number and then extend it to generate a list … With int() The int function takes in parameters and converts it to integers if it is already a number. Python Exercises, Practice and Solution: Write a Python program to get all possible unique subsets from a set of distinct integers. Python program to create a list of tuples from given list having number and its cube in each tuple. a tuple cannot be changed in any way, once it has been created. Let’s discuss ways in which this can be performed. The count() method returns the number of elements with the specified value. Right-click the new field and select Field Calculator. Python | Pair and combine nested list to tuple list. In python 3.1 you can produce a list in a way. Python NumPy Arrays can also be used to iterate a list efficiently.. Python numpy.arange() function creates a uniform sequence of integers.. Syntax for numpy.arange() function: numpy.arange(start, stop, step) start: This parameter is used to provide the starting value/index for the sequence of integers to be generated. Is it damaging to drain an Eaton HS Supercapacitor below its minimum working voltage? We can use the "in" or the "not in" operator for this purpose. Python Server Side Programming Programming. 02, Jan 19. The next example shows a more complex list with a deeply structured list: We go to a virtual supermarket. Input comma separated elements (integers), and converts it into list in Python… Create a list of integers. Parameter Description; value: Required. A naive method to create list within a given range is to first create an empty list and append successor of each integer in every iteration of for loop. The Python implementation for this algorithm is shown below. The list type is essential for Python scripts and programs, in other words, you will hardly find any serious Python code without a list. A tuple is defined analogously to lists, except the set of elements is enclosed in parentheses instead of square brackets. Depending on the needs of our data analysis we may need to check for presence of sequential numbers in a python data container. Example. Tuples are also like lists, but there is one difference that they are immutable meaning they cannot be changed after defined. Of course, there is no "multiplication" between two sequences possible. "" But it is only syntactically the same. What is the right and effective way to tell a child not to vandalize things in public places? When you need to add counters to an iterable, enumerate is usually the most elegant approach. We convert the list to set and simply output the difference between this set and a set that contains integers ranging from min(lst) and max(lst). Python: Tips of the Day. Given a list of integers, write a Python program to convert the given list into a single integer. lists can be recursively constructed by sublist structures. Where I get stuck is writing the loop to check the longest running sequence of repeating integers. share | improve this question | follow | asked Mar 2 '15 at 2:56. Hence having ways to perform this task using shorthands comes handy. What does it mean when an aircraft is statically stable but dynamically unstable? your coworkers to find and share information. It will return the iterable (say list, tuple, range, string or dictionary etc.) A list in python can contain any type of object in sequential form. Python List Comprehension | Segregate 0's and 1's in an array list. Python provides for six sequence (or sequential) data types: Strings, lists, tuples, bytes and range objects may look like utterly different things, but they still have some underlying concepts in common: Unlike other programming languages Python uses the same syntax and function names to work on sequential data types. A Python list is a collection of Python objects indexed by an ordered sequence of integers starting from zero. One liner, thanks! Once a tuple has been created, you can't add elements to a tuple or remove elements from a tuple. Sequences are one of the principal built-in data types besides numerics, mappings, files, instances and exceptions. Assuming I've guessed the pattern correctly (alternating increments of 1 and 3), this should produce the desired result: Assuming your sequence alternates increments between 1 and 3. Creating a list is as simple as putting different comma-separated values between square brackets. An integer for which the average of its positive divisors is also an integer. Note: The code in this article generates sequential numbers for unsorted data based on the OID or FID order. Thanks for contributing an answer to Stack Overflow! 20, Aug 20. Reduce is a really useful function for performing some computation on a list and returning the result. Approach #2 : Alternate naive This is an alternative to the above mentioned naive approach. Does Python have a string 'contains' substring method? For example, if you wanted to compute the product of a list of integers. "If you use the original World Wide Web program, you never see a URL or have to deal with HTML. A list element can be any object. One of them contains covert advertising of my Python courses in Canada: Try to find out the hidden sentence using Slicing. Python - Get a sorted list of random integers with unique elements. The solution consists of 2 steps! New command only for math mode: problem with \S. The problem in my introductory computer science class asks me to find the two largest integers in a list. 25, Feb 19. That's really nice! How to count unique values inside a list. What species is Adira represented as by the holo in S3E13? Design by Denise Mitchinson adapted for python-course.eu by Bernd Klein, "Lists and Strings can be accessed via indices! is defined for a sequence and an integer, i.e. There is a need to generate random numbers when studying a model or behavior of a program for different range of values. It's important to notice that these list elements don't have to be of the same type. Return the number of times the value "cherry" appears int the fruits list: fruits = ['apple', 'banana', 'cherry'] x = fruits.count("cherry") Try it Yourself » Definition and Usage. Python makes it very easy with its slice operator. Da die Funktion „int“ einen Wert liefert können wir auch den Wert in eine Variable speichern und mit dieser dann weiterarbeiten. Asking for help, clarification, or responding to other answers. Main Concept Of Sequences in Python. What is the policy on publishing work in academia that may have already been done (but not published) in industry/military? y[1][0], y[2][0], y[3][0]. 23, Oct 18. with the counters and returned object will be an enumerate. Python: Enumerate. It will return the iterable (say list, tuple, range, string or dictionary etc.) But I knew there must be better ways! For strings it counts the number of characters, and for lists or tuples the number of elements are counted, whereas a sublist counts as one element. filter_none. I'm just having trouble connecting the dots and its not clicking for me. How do I merge two dictionaries in a single expression in Python (taking union of dictionaries)? The following example shows how this operator can be applied: So far we had a "+" operator for sequences. Interconversion between data types is facilitated by python libraries quite easily. Bobby B Bobby B. How do I check if a string is a number (float)? To be more precise: A list in Python is an ordered group of items or elements. Python List count() Method List Methods. play_arrow . We will also check: Python check if the variable is an integer; Python check if the variable is a string; Check if the variable is a list or a tuple in python; Check if the variable is not null in python; Get the type of object in python We have a start and an end index, one or both of them may be missing. "s n" or "n s". Python | Convert a nested list into a flat list. The implementation is different: In the first case the left side has to be evaluated only once. The syntax is simple. Basic python GUI Calculator using tkinter, Selecting ALL records when condition is met for ALL records only. How many presidents had decided not to attend the inauguration of their successor? Division keeps rounding down to 0? Why do massive stars not undergo a helium flash. Python | Get values of particular key in list of dictionaries . How can I generate the sequence of numbers "1,2,5,6,9,10......" and so until 100 in Python? The following example shows how to concatenate two strings into one: The augmented assignment "+=" which is well known for arithmetic assignments work for sequences as well. You have to understand list comprehension to understand the following: Length of a sequence, i.e. With range and sorted. Furthermore, lists can grow in a program run, while in C the size of an array has to be fixed at compile time. We can apply it to nested lists as well: This result is quite astonishing for beginners of Python programming. A004490: Colossally abundant numbers {2, 6, 12, 60, 120, 360, 2520, 5040, 55440, 720720, ...} A number n is colossally abundant if there is an ε > 0 such that for all k > 1, But the problem of converting the entire list of string to integers is quite common in development domain. Flattening a list of lists entails converting a 2D list into a 1D list by un-nesting each list item stored in the list … Podcast 302: Programming in PowerPoint can teach you a few things. Python | Filter a list based on the given list of strings. Check the check box for Show Codeblock. Submitted by IncludeHelp, on August 08, 2018 . for int in the list. Sometimes we need to convert a single number to list of integers and we don’t wish to spend several lines of codes doing it. Furthermore, lists can grow in a program run, while in C the size of an array has to be fixed at compile time. That was a quick and quite dirty solution. Generally speaking a list is a collection of objects. rev 2021.1.8.38287, Stack Overflow works best with JavaScript enabled, Where developers & technologists share private knowledge with coworkers, Programming & related technical career opportunities, Recruit tech talent & build your employer brand, Reach developers & technologists worldwide, A Python 3 version is supplied by Oleh Prypin. "Zurich" and "Hamburg": Slicing works with three arguments as well. 1 This is a design principle for all mutable data structures in Python.. Another thing you might notice is that not all data can be sorted or compared. The join() function takes one parameter that is the list, and returns the string. Create a new short integer field. (Tim Berners Lee). If s is a sequential data type, it works like this: The resulting sequence consists of the following elements: In the following example we define a string and we print every third character of this string: The following string, which looks like a letter salad, contains two sentences. Dieses Kapitel in Python2-Syntax Kurse und Schulungen. Even the operator sign is the same. Any help would be appreciated. Python: Enumerate. Why is the in "posthumous" pronounced as (/tʃ/). Due to the corona pandemic, we are currently running all courses online. Proper way to declare custom exceptions in modern Python? It can we int, str, dictionaries (dict), other objects, or nested list, etc. lst=list(range(100)) for i in range(100) print (lst[i],',',end='') In python 2.7 you can do it as . Python Program to find out the position of an element in a list new_list =['A','K','Q','J','2','3','4','5','6','7','8','9','10'] print(new_list.index('J')) If you run this program the output will be: $ python codespeedy.py 3. the numbers of the lists are enumerated starting with 0: The previous example of a list has been a list with elements of equal data types. Inside the for loop, these string elements are added together after converting them into integers, using the int() method. Random string generation with upper case letters and digits. It applies a rolling computation to sequential pairs of values in a list. To be more precise: A list in Python is an ordered group of items or elements. In this Python tutorial, we will discuss how to check if the variable is an integer in Python. You may be interested in how we created the string. It's best to study the mode of operation of slice by having a look at examples: Syntactically, there is no difference on lists. To subscribe to this RSS feed, copy and paste this URL into your RSS reader. 13, Jun 19. The list is a most versatile datatype available in Python which can be written as a list of comma-separated values (items) between square brackets. In the below programs we find out if among the elements of Alist, there are any consecutive numbers. As functions with possible names like `` substring '', `` gstr '' or `` n s '' lighting invalid... The result, but there is a private, secure spot for you your. Of repeating integers that these list elements do n't have to deal with HTML. follow | asked 2. Slice operator ordered group of items or elements the specified value string elements into actual integers state whether largest... The Variable is an ordered group of items or elements naive this not! Included, but this is not the main problem Python courses in Canada: Try to find if! And returns a boolean value as to whether it is already a.. Or BlaXpirit are nicer answers than mine Get values of particular key in list integers! Generated numbers will not be changed in any way, once it has been created # 2: Alternate this! Python courses in Canada: python list of sequential integers to find the index of an element in a list in Python increase decrease... Alternate naive this is not the main problem Python tutorial, we will return the iterable ( say list tuple... This algorithm is shown in CodeLens 1 < th > in `` ''! Help, clarification, or nested list into a flat list or both of them contains advertising! Beginners of Python objects indexed by an ordered group of items or elements of elements like numbers,,... 'Wars ' / logo © 2021 Stack Exchange Inc ; user contributions licensed under cc by-sa changed in any,. Further description of the principal built-in data types besides numerics, mappings, files, and. Represented as by the OP object are in the first element of the list and the! Records only that these list elements do n't have to understand the example... Or personal experience and how to define a tuple, range, string or a list of between! C programmers will be an enumerate mix up between what is the desired result what!, write a Python program to create a list in Python as simple as putting different comma-separated between! Science class asks me to find the two largest integers must be unique integers functions! Added together after converting them into integers, write a Python program to convert list. 0 to 255, corresponding to ASCII characters and they are immutable meaning they can be changed learn, knowledge! For sequences starting from zero of lists: there are at least integers! Converting all strings in list to string in Python 3.1 you can produce list... `` s n '' or `` n s '' ( dict ), other objects or! Decided not to vandalize things in public places an iterable, enumerate is usually the most approach. Of abbreviation for an n-times concatenation, i.e all records only dieser dann weiterarbeiten in Variable. `` if you wanted to compute the product of a list possible to know if of!, i.e I quickly grab items from a set of distinct integers different. Determined with the specified value FID order this URL into your RSS reader is possible! The list, and build your career days to come to help the angel that was sent to Daniel examples. 2: Alternate naive this is not the main problem or the `` not in '' or the `` ''! `` + '' operator for this algorithm is shown below Python libraries quite.! Greatly appreciated makes it very easy with its slice operator if the list and the item are... Badge 7 7 bronze badges interconversion of data types besides numerics, mappings, files, instances exceptions! Largest integers must be unique integers to lists, but there is no `` multiplication '' between two like. Points on the given list into a flat list elements do n't have to understand the following contains. Numbers in a sorted order on a list need to have the same type to check a! The first sublist of y, i.e of my Python courses in Canada: Try to find the... ] [ 0 ] ordered, it is already a number containing strings but the problem in introductory! Variable speichern und mit dieser dann weiterarbeiten, you should use the `` not in '' or the `` ''... As easy as adding two numbers together side has to be evaluated only.... An alternative to the above Python program to convert the list contains either of the list in Python can such., list indices start at 0, and here python list of sequential integers a proper introduction elements! Its minimum working voltage is it possible to know if subtraction of 2 points on given... Indices start at 0, and lists can be determined with the function len ( ).... Or remove elements from a set of elements with the function needs the list in modern Python in each.. Of an element in a single integer to my inventory to notice that these elements... Like `` substring '', `` gstr '' or `` substr '' the interconversion of data types besides,! Technique, the sequential search of a sequence and an integer in Python, you never see a URL have... Of objects ways in which this can be sliced, concatenated and so on problem that is quite for. Or elements elements can be updated, removed, and returns a value... S discuss ways in which this can be changed in any way, once it has created... Easy with python list of sequential integers slice operator a list based on the Capitol on 6! With three arguments as well so until 100 in Python write HTML. start at 0, lists... Be sequential `` multiplication '' between two sequences possible. `` '' operator for sequences currently running courses! Behavior of a program for different range of values n't add elements to python list of sequential integers tuple and how to iterate rows. And separated by commas elements can be determined with the function needs the list integers. Changed in any way, once it has been created are the most flexible data structure in Python 3.1 can... Trouble connecting the dots and its not clicking for me to generate random numbers when studying a model behavior. ) on the Capitol on Jan 6 vandalize things in public places: Slicing with! Are one of the array be unique integers ordered sequence of integers between 0 and n, a is. Facilitated by Python python list of sequential integers quite easily Practice and solution: write a program! S discuss ways in which this can be performed or both of them contains covert advertising of my Python in. Bronze badges “ Post your Answer ”, you never see a URL or have to deal HTML... Your RSS reader should use the … Python lists a way,,! Subsets from a chest to my inventory is as simple as putting different comma-separated values between square and! Between what is the desired result and what we can apply it nested. Converting the entire list of dictionaries ) augment assignments may be missing this purpose that....... '' and so on of its positive divisors is also an integer for which the average its! Unique integers: this result is quite common in programming changed after defined numbers! Concatenation, i.e first searching technique, the generated numbers will not be.! For presence of sequential numbers for unsorted data based on the elliptic curve negative deal! Wert liefert können wir auch den Wert in eine Variable speichern und mit dann! After defined the sequence of numbers `` 1,2,5,6,9,10...... '' and so until in... A separate range object of them contains covert advertising of my Python courses in Canada: Try find. Filled only with integers is quite common in development domain speaking a list containing strings but the in! Or elements Capitol on Jan 6 indexed by an ordered group of items or elements furthermore, there are consecutive! Items from a set of distinct integers data structure in Python is an alternative to the corona pandemic we. Than mine among the elements of a string is a need to have the same as for lists present... Or 2 first element of the principal built-in data types is facilitated by Python libraries quite easily numbers.. Did Trump himself order the National Guard to clear out protesters ( who with. Like lists, but this is an immutable list, tuple, can be an enumerate the sorted function rearrange... A model or behavior of a list is the list rather than the.! With upper case letters and digits met for all records when condition is met for all records only in.... The array more complex list with a deeply structured list: we go a... | Filter a list based on opinion ; back them up with references or personal.... The inauguration of their successor count ( ) method returns the number of elements the! Tuple, range, string or a tuple, range, string or a tuple has created... Mentioned naive approach the dots and python list of sequential integers not clicking for me for n-times... Sorted order needs of our data analysis we may need to generate random by! Printed as such int “ einen Wert liefert können wir auch den in!, it is present, we will return the iterable ( say,! As an optimization not all the python list of sequential integers in a list is the list and the item we are with... Elements of the list and the item we are looking for and returns boolean! 255, corresponding to ASCII characters and they are printed as such to..., instances and exceptions indices are the most elegant approach a deeply structured list: we to. Funktion „ int “ einen Wert liefert können wir auch den Wert in eine speichern...